Skip to content

Instantly share code, notes, and snippets.

View tbg's full-sized avatar

Tobias Grieger tbg

View GitHub Profile
root@:26257/tpcc> SELECT *, w_ytd-sum_d_ytd FROM warehouse FULL OUTER JOIN (SELECT d_w_id, sum(d_ytd) as sum_d_ytd FROM district GROUP BY d_w_id) ON (w_id = d_w_id) WHERE w_ytd != sum_d_ytd;
w_id | w_name | w_street_1 | w_street_2 | w_city | w_state | w_zip | w_tax | w_ytd | d_w_id | sum_d_ytd | ?column?
+------+--------+------------+------------+--------+---------+-----------+--------+-----------+--------+-----------+----------+
564 | 6 | 12 | 17 | 13 | PE | 508411111 | 0.1030 | 339127.73 | 564 | 344001.97 | -4874.24
(1 row)
root@:26257/tpcc> select * from history where h_amount = 4874.24;
rowid | h_c_id
#!/bin/bash
set -euxo pipefail
need_import=1
if [ -d cockroach-data/0 ]; then
need_import=0
fi
diff --git a/pkg/storage/intent_resolver.go b/pkg/storage/intent_resolver.go
index cde28265ca..bfe3d5b946 100644
--- a/pkg/storage/intent_resolver.go
+++ b/pkg/storage/intent_resolver.go
@@ -18,6 +18,7 @@ package storage
import (
"container/list"
"context"
+ "math/rand"
"sort"
@tbg
tbg / 2.2 M3 commits
Created January 3, 2019 13:40
git log --no-decorate --pretty='format:%s (%an %ar)' --author 'Tobias' --author Andrei --author Nikhil --author Nathan --author Peter --after 'Dec 12 2018' | pbcopy
storage: exit process when disks are stalled (Tobias Schottdorf 56 minutes ago)
distsqlrun: refactor the ridiculous processor.Run() interface (Andrei Matei 4 days ago)
distsqlrun: remove redundant code from some processors (Andrei Matei 4 days ago)
distsqlrun: add debugging info to a test (Andrei Matei 4 days ago)
storage: remove legacy code around VersionNoRaftProposalKeys (Nathan VanBenschoten 15 hours ago)
libroach/engine: plumb support for SingleDelete operation (Nathan VanBenschoten 19 hours ago)
distsql: flow start refactoring (Andrei Matei 4 days ago)
distsql: refactor flow.StartSync() (Andrei Matei 4 days ago)
storage: fatal on replica corruption (Tobias Schottdorf 21 hours ago)
cli: improve default program for merge-logs (Tobias Schottdorf 26 hours ago)
This file has been truncated, but you can view the full file.
1h14m33s 0 223.0 213.7 33.6 75.5 79.7 88.1 write
1h14m33s 0 232.1 212.6 31.5 71.3 79.7 83.9 write
1h14m33s 0 228.0 213.3 31.5 71.3 79.7 88.1 write
1h14m34s 0 223.0 213.8 33.6 67.1 75.5 75.5 write
1h14m34s 0 229.0 213.8 35.7 65.0 79.7 88.1 write
1h14m34s 0 224.0 213.7 35.7 67.1 79.7 92.3 write
1h14m34s 0 227.0 212.6 35.7 65.0 79.7 88.1 write
1h14m34s 0 236.0 213.3 32.5 62.9 71.3 75.5 write
1h14m35s 0 193.0 213.8 29.4 75.5 302.0 352.3 write
16:47:21 allocator.go:274: last range event: remove for range 78/store 1 (0s ago)
(dlv) goroutines -r -t
Goroutine 1 - Runtime: /usr/local/go/src/runtime/proc.go:292 runtime.gopark (0x692aea)
0 0x0000000000692aea in runtime.gopark
at /usr/local/go/src/runtime/proc.go:292
1 0x00000000006a2800 in runtime.selectgo
at /usr/local/go/src/runtime/select.go:392
2 0x000000000214679e in github.com/cockroachdb/cockroach/pkg/cli.runStart
at ./pkg/cli/start.go:737
3 0x0000000002158b4b in github.com/cockroachdb/cockroach/pkg/cli.MaybeDecorateGRPCError.func1
at ./pkg/cli/error.go:70
@tbg
tbg / gcore
Created December 6, 2018 14:22
$ sudo gcore 3201
[New LWP 3203]
[New LWP 3204]
[New LWP 3205]
[New LWP 3206]
[New LWP 3207]
[New LWP 3208]
[New LWP 3209]
[New LWP 3210]
[New LWP 3211]
I181203 10:35:11.295894 1 rand.go:75 Random seed: -1406632157081116611
=== RUN TestSplitTriggerRaftSnapshotRace
W181203 10:35:11.327146 9 server/status/runtime.go:295 [n?] Could not parse build timestamp: parsing time "" as "2006/01/02 15:04:05": cannot parse "" as "2006"
I181203 10:35:11.354126 9 server/server.go:849 [n?] monitoring forward clock jumps based on server.clock.forward_jump_check_enabled
I181203 10:35:11.354300 9 base/addr_validation.go:279 [n?] server certificate addresses: IP=127.0.0.1,::1; DNS=localhost,*.local; CN=node
I181203 10:35:11.354330 9 base/addr_validation.go:319 [n?] web UI certificate addresses: IP=127.0.0.1,::1; DNS=localhost,*.local; CN=node
I181203 10:35:11.384100 9 server/config.go:484 [n?] 1 storage engine initialized
I181203 10:35:11.384123 9 server/config.go:487 [n?] RocksDB cache size: 128 MiB
I181203 10:35:11.384132 9 server/config.go:487 [n?] store 0: in-memory, size 0 B
I181203 10:35:11.402658 9 util/stop/stopper.go:537 [n?] quiescing; tasks left:
panic: test timed out after 8m0s
goroutine 475591 [running]:
testing.(*M).startAlarm.func1()
/usr/local/go/src/testing/testing.go:1240 +0xfc
created by time.goFunc
/usr/local/go/src/time/sleep.go:172 +0x44
goroutine 1 [chan receive, 6 minutes]:
testing.(*T).Run(0xc42097c4b0, 0x2cab280, 0x19, 0x2dca480, 0x976d01)
$ roachprod ssh tobias-test -- grep -h -R 'r2[42]' | cut -c 2- | sort | less -S
181115 13:34:13.273356 2449 storage/replica_command.go:306 [n1,s1,r47/1:/{Table/53/1/4…-Max}] initiating a split of this range at key /Table/53/1/5161764/5 [r22]
181115 13:34:13.807320 2504 storage/replica_command.go:306 [n1,s1,r22/1:/{Table/53/1/5…-Max}] initiating a split of this range at key /Table/53/1/5726787/5 [r23]
181115 13:34:13.872233 2513 storage/replica_command.go:449 [n1,merge,s1,r22/1:/Table/53/1/5{161764…-726787…}] initiating a merge of r23:/{Table/53/1/5726787/5-Max} [(n1,s1):1, (n3,s4):2, (n4,s3):3, next=4, gen=0
181115 13:34:14.084370 191 storage/store.go:2561 [n1,s1,r22/1:/Table/53/1/5{161764…-726787…}] removing replica r23/1
181115 13:34:14.084940 123 storage/store.go:2561 [n3,s4,r22/2:/Table/53/1/5{161764…-726787…}] removing replica r23/2
181115 13:34:14.087220 144 storage/store.go:2561 [n4,s3,r22/3:/Table/53/1/5{161764…-726787…}] removing replica r23/3
181115 13:34:14.162425 2496 storage/replica_command