Skip to content

Instantly share code, notes, and snippets.

@tamird
tamird / sql.stats
Created November 2, 2015 02:20
jemalloc stats in cockroachdb
___ Begin jemalloc statistics ___
Version: 0.0.0-0-g0000000000000000000000000000000000000000
Assertions disabled
Run-time option settings:
opt.abort: false
opt.lg_chunk: 21
opt.dss: "secondary"
opt.narenas: 16
opt.lg_dirty_mult: 3 (arenas.lg_dirty_mult: 3)
opt.stats_print: false
commit e84576027590e617e639c30e8bdf4a935a86fc6b
Author: Tamir Duberstein <[email protected]>
Date: Tue Nov 3 17:44:04 2015 -0500
return a callback that unregisters
diff --git a/gossip/client.go b/gossip/client.go
index 6ba0ccd..e1945d2 100644
--- a/gossip/client.go
+++ b/gossip/client.go
⏚ [tamird:~/src/go/src/github.com/cockroachdb/cockroach] revert-revert-multicpu(+1/-0) 2 ± make testrace PKG=./storage TESTFLAGS='-count 300 -parallel 1'
go test -tags '' -race -i ./storage
go test -tags '' -race -run . ./storage -timeout 5m -count 300 -parallel 1
I1104 00:08:43.609204 45133 multiraft/multiraft.go:936 node 1 campaigning because initial confstate is [1]
I1104 00:08:43.610524 45133 storage/replica_command.go:1119 range 1: new leader lease replica {1 1 1} 1970-01-01 00:00:00 +0000 UTC +1.000s
I1104 00:08:43.623744 45133 storage/engine/rocksdb.go:132 closing in-memory rocksdb instance
I1104 00:08:43.713963 45133 multiraft/multiraft.go:936 node 1 campaigning because initial confstate is [1]
I1104 00:08:43.714968 45133 storage/replica_command.go:1119 range 1: new leader lease replica {1 1 1} 1970-01-01 00:00:00 +0000 UTC +1.000s
I1104 00:08:43.716292 45133 storage/engine/rocksdb.go:132 closing in-memory rocksdb instance
I1104 00:08:43.721331 45133 multiraft/multiraft.go:936 node 1 campaign
valgrind ./main.test
==6001== Memcheck, a memory error detector
==6001== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==6001== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info
==6001== Command: ./main.test
==6001==
==6001== Syscall param set_robust_list(head) points to uninitialised byte(s)
==6001== at 0x569E6F: __pthread_initialize_minimal (nptl-init.c:358)
==6001== by 0x56F5BD: (below main) (in /go/src/golang/src/main.test)
==6001== Address 0x4000b70 is not stack'd, malloc'd or (recently) free'd
@tamird
tamird / gist:5f5668e181cafe7d580f
Created December 11, 2015 18:44
docker http redirect
$ curl -I https://docs.docker.com/installation/mac/#from-your-shell
HTTP/1.1 301 Moved Permanently
Content-Length: 0
Connection: keep-alive
Date: Fri, 11 Dec 2015 18:40:59 GMT
Location: http://docs.docker.com/engine/installation/mac/
Server: AmazonS3
X-Cache: Miss from cloudfront
Via: 1.1 1b4ecfde85b6ff2733c4d836183be7ba.cloudfront.net (CloudFront)
X-Amz-Cf-Id: SyKE66gXkYxDGPGiZ20S3hyJmQ_aBV8KLbvdZO2aqO6gAVoB91MmBQ==
#!/usr/bin/env sh
set -eu
if [ $# == 0 ]; then
branch_name=$(git rev-parse --abbrev-ref HEAD)
remote_name=$(git config branch."$branch_name".remote)
github_forked_org_name=$(git config remote."$remote_name".url | sed -E -e 's,^(https://|git@)github.com[:/]([a-z]+)/[a-z]+(\.git)?,\2,')
github_origin_proj_url=$(git config remote.origin.url | sed -E -e 's,^(https://|git@)github.com[:/]([a-z]+/[a-z]+)(\.git)?,\2,')
@tamird
tamird / -
Last active February 12, 2016 02:25
diff --git a/sql/parser/builtins.go b/sql/parser/builtins.go
index e6c17ec..6c71db3 100644
--- a/sql/parser/builtins.go
+++ b/sql/parser/builtins.go
@@ -547,9 +547,11 @@ var builtins = map[string][]builtin{
},
},
- "statement_timestamp": {nowImpl},
- "current_timestamp": {nowImpl},
@tamird
tamird / -
Created February 12, 2016 02:50
#!/usr/bin/env sh
set -eu
error_message() {
ret=$?
if [ $ret -ne 0 ]; then
echo "Something went wrong. Did you push your branch? Did you set a remote tracking branch?"
fi
exit $ret
@tamird
tamird / -
Created February 12, 2016 04:08
WARNING: DATA RACE
Write by goroutine 25:
bufio.(*Writer).flush()
/Users/tamird/src/go1.5/src/bufio/bufio.go:571 +0x3f0
bufio.(*Writer).Flush()
/Users/tamird/src/go1.5/src/bufio/bufio.go:551 +0x3a
golang.org/x/net/http2.(*responseWriter).Flush()
/Users/tamird/src/go/src/golang.org/x/net/http2/server.go:2172 +0xf8
google.golang.org/grpc/transport.(*serverHandlerTransport).Write()
/Users/tamird/src/go/src/google.golang.org/grpc/transport/handler_server.go:225 +0x12d
@tamird
tamird / -
Created February 12, 2016 04:28
WARNING: DATA RACE
Read by goroutine 180:
runtime.slicecopy()
/Users/tamird/src/go1.5/src/runtime/slice.go:110 +0x0
golang.org/x/net/http2.(*Framer).WriteData()
/Users/tamird/src/go/src/golang.org/x/net/http2/frame.go:576 +0x520
golang.org/x/net/http2.(*writeData).writeFrame()
/Users/tamird/src/go/src/golang.org/x/net/http2/write.go:97 +0xc3
golang.org/x/net/http2.(*serverConn).writeFrameAsync()
/Users/tamird/src/go/src/golang.org/x/net/http2/server.go:736 +0x8b