Skip to content

Instantly share code, notes, and snippets.

View tbg's full-sized avatar

Tobias Grieger tbg

View GitHub Profile
@tbg
tbg / sql-todo.md
Last active April 21, 2020 14:07
SQL issue for multi-tenancy

Blocks Free Tier Phase 2

  • SQL relies on Gossip for system config @ajwerner
  • Jobs relies on node liveness and NodeIDs generally

Not Blocker

@tbg
tbg / gist:0a793101e942a3e998d3967f3d68df10
Created April 8, 2020 10:46
expected latches held, found none
mkdir -p lib
ln -sf /Users/tschottdorf/go/native/x86_64-apple-darwin19.3.0/geos/lib/lib{geos,geos_c}.dylib lib
GOFLAGS= go test -exec 'stress -p 4' -tags ' make x86_64_apple_darwin19.3.0' -ldflags '-X github.com/cockroachdb/cockroach/pkg/build.typ=development -extldflags "" -X "github.com/cockroachdb/cockroach/pkg/build.tag=v20.1.0-beta.4-452-g655c9eac1f-dirty" -X "github.com/cockroachdb/cockroach/pkg/build.rev=655c9eac1fc62379e44565188970d89e0bc8c1e7" -X "github.com/cockroachdb/cockroach/pkg/build.cgoTargetTriple=x86_64-apple-darwin19.3.0" ' -run "TestKVNemesisSingleNode" -timeout 0 ./pkg/kv/kvnemesis/ -v -args -test.timeout 30m
4 runs so far, 0 failures, over 5s
12 runs so far, 0 failures, over 10s
21 runs so far, 0 failures, over 15s
34 runs so far, 0 failures, over 20s
44 runs so far, 0 failures, over 25s
57 runs so far, 0 failures, over 30s
66 runs so far, 0 failures, over 35s
@tbg
tbg / kvnemesis_test.go
Created April 8, 2020 10:29
- error applying x.ReverseScan(ctx, /Table/50/"b8f60bac", /Table/50/"bccc30d8", 4) // (nil, resolving lock at /Table/50/"0010408c" on end transaction [COMMITTED]: Not implemented: SeekForPrev() not supported):
=== RUN TestKVNemesisMultiNode
I200408 10:28:27.831202 82 base/addr_validation.go:296 [n?] server certificate addresses: IP=127.0.0.1,::1; DNS=localhost,*.local; CN=node
I200408 10:28:27.831224 82 base/addr_validation.go:342 [n?] web UI certificate addresses: IP=127.0.0.1,::1; DNS=localhost,*.local; CN=node
W200408 10:28:27.835480 82 server/status/runtime.go:308 [n?] Could not parse build timestamp: parsing time "" as "2006/01/02 15:04:05": cannot parse "" as "2006"
I200408 10:28:27.848540 82 server/server.go:1092 [n?] monitoring forward clock jumps based on server.clock.forward_jump_check_enabled
I200408 10:28:27.851763 82 server/config.go:573 [n?] 1 storage engine initialized
I200408 10:28:27.851778 82 server/config.go:576 [n?] RocksDB cache size: 128 MiB
I200408 10:28:27.851785 82 server/config.go:576 [n?] store 0: in-memory, size 0 B
I200408 10:28:27.851964 82 server/server.go:1553 [n?] no stores bootstrapped and --join flag specified, awaiting init command or join with an already initialized no
@tbg
tbg / kvnemesis_test.go
Created April 8, 2020 10:26
batch with MaxSpanRequestKeys=11, TargetBytes=0 needs splitting
=== RUN TestKVNemesisMultiNode
I200408 10:24:44.929154 83 base/addr_validation.go:296 [n?] server certificate addresses: IP=127.0.0.1,::1; DNS=localhost,*.local; CN=node
I200408 10:24:44.929196 83 base/addr_validation.go:342 [n?] web UI certificate addresses: IP=127.0.0.1,::1; DNS=localhost,*.local; CN=node
W200408 10:24:44.933532 83 server/status/runtime.go:308 [n?] Could not parse build timestamp: parsing time "" as "2006/01/02 15:04:05": cannot parse "" as "2006"
I200408 10:24:44.946008 83 server/server.go:1092 [n?] monitoring forward clock jumps based on server.clock.forward_jump_check_enabled
I200408 10:24:44.949391 83 server/config.go:573 [n?] 1 storage engine initialized
I200408 10:24:44.949405 83 server/config.go:576 [n?] RocksDB cache size: 128 MiB
I200408 10:24:44.949410 83 server/config.go:576 [n?] store 0: in-memory, size 0 B
I200408 10:24:44.949611 83 server/server.go:1553 [n?] no stores bootstrapped and --join flag specified, awaiting init command or join with an already initialized no
GOROOT=/usr/local/Cellar/go/1.13.4/libexec #gosetup
GOPATH=/Users/tschottdorf/go #gosetup
/usr/local/Cellar/go/1.13.4/libexec/bin/go test -c -o /private/var/folders/yy/4q8rrssd27vdgbr59w9qbffr0000gn/T/___TestKVNemesisMultiNode_in_github_com_cockroachdb_cockroach_pkg_kv_kvnemesis github.com/cockroachdb/cockroach/pkg/kv/kvnemesis #gosetup
/usr/local/Cellar/go/1.13.4/libexec/bin/go tool test2json -t /private/var/folders/yy/4q8rrssd27vdgbr59w9qbffr0000gn/T/___TestKVNemesisMultiNode_in_github_com_cockroachdb_cockroach_pkg_kv_kvnemesis -test.v -test.run ^TestKVNemesisMultiNode$ #gosetup
I200407 11:49:08.018885 1 rand.go:85 Random seed: 733168521790965481
=== RUN TestKVNemesisMultiNode
I200407 11:49:08.022001 66 base/addr_validation.go:296 [n?] server certificate addresses: IP=127.0.0.1,::1; DNS=localhost,*.local; CN=node
I200407 11:49:08.022027 66 base/addr_validation.go:342 [n?] web UI certificate addresses: IP=127.0.0.1,::1; DNS=localhost,*.local; CN=node
W200407 11:49:08.026745 66 server/status/runtime.go:3
------- Stdout: -------
=== RUN TestDropDatabaseDeleteData
I200306 10:45:57.367324 195580 base/addr_validation.go:296 [n?] server certificate addresses: IP=127.0.0.1,::1; DNS=localhost,*.local; CN=node
I200306 10:45:57.367466 195580 base/addr_validation.go:342 [n?] web UI certificate addresses: IP=127.0.0.1,::1; DNS=localhost,*.local; CN=node
W200306 10:45:57.417251 195580 server/status/runtime.go:308 [n?] Could not parse build timestamp: parsing time "" as "2006/01/02 15:04:05": cannot parse "" as "2006"
I200306 10:45:57.427202 195580 server/server.go:1034 [n?] monitoring forward clock jumps based on server.clock.forward_jump_check_enabled
I200306 10:45:57.452255 195580 server/config.go:572 [n?] 1 storage engine initialized
I200306 10:45:57.452281 195580 server/config.go:575 [n?] RocksDB cache size: 128 MiB
I200306 10:45:57.452290 195580 server/config.go:575 [n?] store 0: in-memory, size 0 B
I200306 10:45:57.452386 195580 server/server.go:1486 [n?] no stores bootstrapped and --join flag specified,
@tbg
tbg / logictest.txt
Created February 17, 2020 22:23
cat batches_logictest.test.txt | sed -E 's/[0-9]+ //g' | sort | uniq
AddSstable
AdmChangeReplicas
AdmRelocateRng
AdmScatter
AdmSplit
AdmTransferLease
AdmUnsplit
CPut
CPut, Del
CPut, Del, EndTxn
This file has been truncated, but you can view the full file.
I200207 16:24:32.552601 1 util/log/sync_buffer.go:70 [config] file created at: 2020/02/07 16:24:32
I200207 16:24:32.552601 1 util/log/sync_buffer.go:70 [config] running on machine: teamcity-1736338-1581091138-03-n4cpu4-0001
I200207 16:24:32.552601 1 util/log/sync_buffer.go:70 [config] binary: CockroachDB CCL v20.1.0-alpha.20191118-2000-g47b425f (x86_64-unknown-linux-gnu, built 2020/02/07 15:34:46, go1.13.5)
I200207 16:24:32.552601 1 util/log/sync_buffer.go:70 [config] arguments: [./cockroach start --insecure --store=path=/mnt/data1/cockroach --log-dir=/home/ubuntu/logs --cache=25% --max-sql-memory=25% --port=26257 --http-port=26258 --locality=cloud=gce,region=us-central1,zone=us-central1-b --advertise-host=10.128.0.64]
I200207 16:24:32.552601 1 util/log/sync_buffer.go:70 line format: [IWEF]yymmdd hh:mm:ss.uuuuuu goid file:line msg utf8=✓
I200207 16:24:32.552599 1 cli/start.go:1133 logging to directory /home/ubuntu/logs
W200207 16:24:32.553090 1 cli/start.go:1172 RUNNING IN INSECURE MODE!
- Your cluste
goroutine 168747677 [syscall, 58575 minutes]:
github.com/cockroachdb/cockroach/pkg/storage/engine._Cfunc_DBIterNext(0x7f5ce289a300, 0x7f5ce289a300, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
_cgo_gotypes.go:867 +0x65
github.com/cockroachdb/cockroach/pkg/storage/engine.(*rocksDBIterator).Next.func1(0x7f5ce289a300, 0x1183f00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/go/src/github.com/cockroachdb/cockroach/pkg/storage/engine/rocksdb.go:2116 +0xa6
github.com/cockroachdb/cockroach/pkg/storage/engine.(*rocksDBIterator).Next(0xc5f183ce70)
/go/src/github.com/cockroachdb/cockroach/pkg/storage/engine/rocksdb.go:2116 +0x5a
github.com/cockroachdb/cockroach/pkg/storage/rditer.(*ReplicaDataIterator).Next(0xc583c77950)
/go/src/github.com/cockroachdb/cockroach/pkg/storage/rditer/replica_data_iter.go:116 +0x34
tschottdorf@gceworker-tschottdorf:~/go/src/github.com/cockroachdb/cockroach$ ./cockroach-linux-2.6.32-gnu-amd64 debug merge-logs artifacts/tpccbench/nodes\=9/cpu\=4/multi-region/run_1/*.logs/*.log --filter 'r231[^0-9]'
tobias-1570199197-01-n12cpu4-geo-0003> I191004 22:04:36.999231 2725 storage/replica_command.go:411 [n3,s3,r225/2:/Table/5{8/1/89/5…-9}] initiating a split of this range at key /Table/58/1/90/5244 [r231] (manual)
tobias-1570199197-01-n12cpu4-geo-0003> I191004 22:04:37.728773 2859 storage/replica_command.go:1583 [n3,s3,r231/2:/Table/5{8/1/90/5…-9}] change replicas (add [(n6,s6):4LEARNER] remove []): existing descriptor r231:/Table/5{8/1/90/5244-9} [(n8,s8):1, (n3,s3):2, (n5,s5):3, next=4, gen=33, sticky=1570230259.080228881,0]
tobias-1570199197-01-n12cpu4-geo-0003> I191004 22:04:38.102603 2846 storage/replica_command.go:411 [n3,s3,r231/2:/Table/5{8/1/90/5…-9}] initiating a split of this range at key /Table/58/1/133/87285 [r233] (manual); delayed split for 0.2s to avoid Raft snapshot
tobias-15