Skip to content

Instantly share code, notes, and snippets.

View tbg's full-sized avatar

Tobias Grieger tbg

View GitHub Profile
@tbg
tbg / -
Created August 4, 2015 06:01
go test -tags '' -i ./storage
go test -tags '' -run TestRaftAfterRemoveRange -cpu 1 ./storage -timeout 10s -v --verbosity=1
=== RUN TestRaftAfterRemoveRange
I0804 02:01:20.668546 93859 storage/engine/rocksdb.go:99 opening in-memory rocksdb instance
W0804 02:01:20.678905 93859 rpc/tls.go:41 listening via tcp to 127.0.0.1:0 without TLS
I0804 02:01:20.681252 93859 multiraft/multiraft.go:454 node 100000001 starting
I0804 02:01:20.682832 93859 storage/range.go:986 gossiping cluster id from store 1, range 1
I0804 02:01:20.684805 93859 raft/raft.go:390 100000001 became follower at term 5
I0804 02:01:20.684892 93859 raft/raft.go:207 newRaft 100000001 [peers: [100000001], term: 5, commit: 10, applied: 10, lastindex: 10, lastterm: 5]
I0804 02:01:20.684960 93859 raft/raft.go:464 100000001 is starting a new election at term 5
@tbg
tbg / -
Created August 4, 2015 06:03
go test -tags '' -i ./storage
go test -tags '' -run TestRaftAfterRemoveRange -cpu 1 ./storage -timeout 10s -v --verbosity=1
=== RUN TestRaftAfterRemoveRange
I0804 02:03:00.493796 94286 storage/engine/rocksdb.go:99 opening in-memory rocksdb instance
W0804 02:03:00.503873 94286 rpc/tls.go:41 listening via tcp to 127.0.0.1:0 without TLS
I0804 02:03:00.506259 94286 multiraft/multiraft.go:454 node 100000001 starting
I0804 02:03:00.507684 94286 storage/range.go:986 gossiping cluster id from store 1, range 1
I0804 02:03:00.509799 94286 raft/raft.go:390 100000001 became follower at term 5
I0804 02:03:00.509884 94286 raft/raft.go:207 newRaft 100000001 [peers: [100000001], term: 5, commit: 10, applied: 10, lastindex: 10, lastterm: 5]
I0804 02:03:00.509950 94286 raft/raft.go:464 100000001 is starting a new election at term 5
@tbg
tbg / -
Created August 4, 2015 06:05
go test -tags '' -i ./storage
go test -tags '' -run TestRaftAfterRemoveRange -cpu 1 ./storage -timeout 10s -v --verbosity=1
=== RUN TestRaftAfterRemoveRange
I0804 02:05:02.456759 96189 storage/engine/rocksdb.go:99 opening in-memory rocksdb instance
W0804 02:05:02.467266 96189 rpc/tls.go:41 listening via tcp to 127.0.0.1:0 without TLS
I0804 02:05:02.468869 96189 multiraft/multiraft.go:454 node 100000001 starting
I0804 02:05:02.470617 96189 storage/replica.go:988 gossiping cluster id from store 1, range 1
I0804 02:05:02.472605 96189 raft/raft.go:390 100000001 became follower at term 5
I0804 02:05:02.472690 96189 raft/raft.go:207 newRaft 100000001 [peers: [100000001], term: 5, commit: 10, applied: 10, lastindex: 10, lastterm: 5]
I0804 02:05:02.472757 96189 raft/raft.go:464 100000001 is starting a new election at term 5
AST: (*parser.Select)(0x2084a6000)({
Distinct: (string) "",
Exprs: (parser.SelectExprs) (len=1 cap=1) {
(*parser.NonStarExpr)(0x2084f0020)({
Expr: (*parser.QualifiedName)(0x2084f4060)({
Base: (parser.Name) (len=5) "\xc8rray",
Indirect: (parser.Indirection) (len=1 cap=1) {
(*parser.ArrayIndirection)(0x2084f0000)({
Begin: (parser.Expr) <nil>,
End: (parser.Expr) <nil>
AST: (*parser.Select)(0x2084a6000)({
Distinct: (string) "",
Exprs: (parser.SelectExprs) (len=1 cap=1) {
(*parser.NonStarExpr)(0x20848c2e0)({
Expr: (*parser.QualifiedName)(0x2084a8780)({
Base: (parser.Name) (len=1) "A",
Indirect: (parser.Indirection) (len=5 cap=8) {
(*parser.ArrayIndirection)(0x20848c120)({
Begin: (*parser.QualifiedName)(0x2084a8480)({
Base: (parser.Name) (len=1) "A",
AST: (*parser.Select)(0x2084a6000)({
Distinct: (string) "",
Exprs: (parser.SelectExprs) (len=1 cap=1) {
(*parser.NonStarExpr)(0x2084f0020)({
Expr: (*parser.QualifiedName)(0x2084f4060)({
Base: (parser.Name) (len=5) "\xc8rray",
Indirect: (parser.Indirection) (len=1 cap=1) {
(*parser.ArrayIndirection)(0x2084f0000)({
Begin: (parser.Expr) <nil>,
End: (parser.Expr) <nil>
@tbg
tbg / -
Created August 4, 2015 22:07
SELECT+y[array[]]AST: (*parser.Select)(0x2084a4000)({
Distinct: (string) "",
Exprs: (parser.SelectExprs) (len=1 cap=1) {
(*parser.NonStarExpr)(0x20848a0c0)({
Expr: (*parser.UnaryExpr)(0x20848a2a0)({
Operator: (parser.UnaryOp) 0,
Expr: (*parser.UnaryExpr)(0x20848a080)({
Operator: (parser.UnaryOp) 0,
Expr: (*parser.UnaryExpr)(0x20848a060)({
Operator: (parser.UnaryOp) 0,
function rt() { rm -f "${1}.test" && make test TESTFLAGS=-c PKG=./$1 && while [ $? -eq 0 ]; do echo -n "." && (OUT=$(./${1}.test --test.run "${2}" --test.timeout=5s 2>&1) || (echo "${OUT}" && false)); done }
10:58 $ git grep AsRawKey -- '*.go' | grep -v _test
keys/keys.go: return Meta1Prefix.AsRawKey(), Meta1Prefix.PrefixEnd().AsRawKey(), nil
keys/keys.go: return Meta1KeyMax.AsRawKey(), Meta1Prefix.PrefixEnd().AsRawKey(), nil
keys/keys.go: return key.Next().AsRawKey(), key[:len(Meta1Prefix)].PrefixEnd().AsRawKey(), nil
keys/keys.go: return Meta1Prefix.AsRawKey(), key.Next().AsRawKey(), nil
keys/keys.go: return key[:len(Meta1Prefix)].AsRawKey(), key.Next().AsRawKey(), nil
kv/batch.go: header.Key = from.AsRawKey() // "from" can't be local
kv/batch.go: header.EndKey = to.AsRawKey() // "to" can't be local
kv/dist_sender.go: Key: key.AsRawKey(),
kv/local_sender.go: err = roachpb.NewRangeKeyMismatchError(start.AsRawKey(), end.AsRawKey(), nil)
@tbg
tbg / gist:3ae3e9a025882f71ef57
Created October 22, 2015 14:28
raft panic on node restart
I1022 10:18:36.467819 38605 acceptance/put_test.go:168 round 11: restarting nodes [2 1]
I1022 10:18:36.621232 38605 acceptance/put_test.go:173 restarting 0
I1022 10:18:36.908888 38605 acceptance/put_test.go:173 restarting 1
W1022 10:18:36.908977 38605 client/rpc_sender.go:93 failed to send RPC request Server.Batch: client is unhealthy
W1022 10:18:36.909913 38605 rpc/client.go:226 dial tcp 192.168.99.100:33538: getsockopt: connection refused
W1022 10:18:37.142376 38605 client/rpc_sender.go:93 failed to send RPC request Server.Batch: client is unhealthy
W1022 10:18:37.150573 38605 acceptance/put_test.go:181 monkey sleeping while cluster recovers...
W1022 10:18:37.150623 38605 client/rpc_sender.go:93 failed to send RPC request Server.Batch: client is unhealthy
W1022 10:18:37.151009 38605 rpc/client.go:226 dial tcp 192.168.99.100:33539: getsockopt: connection refused
I1022 10:18:37.280500 38605 acceptance/put_test.go:205 9854 (2604, 3469, 3781)