Skip to content

Instantly share code, notes, and snippets.

View tbg's full-sized avatar

Tobias Grieger tbg

View GitHub Profile
Advent of protobuf hackery
You have this proto message.
message RequestHeader {
// some fields
}
You want to add a field to it that is "there" only during crdb_test.
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
AVG_DURATION_SEC TEST_NAME
88.719246032000 github.com/cockroachdb/cockroach/pkg/kv/kvserver: TestReplicateQueueSwapVotersWithNonVoters
67.954845606000 github.com/cockroachdb/cockroach/pkg/kv/kvserver: TestReplicateQueueRebalanceMultiStore
59.736863905000 github.com/cockroachdb/cockroach/pkg/kv/kvserver/protectedts/ptstorage: TestStorage
52.481829026000 github.com/cockroachdb/cockroach/pkg/kv/kvserver: TestMergeQueueSeesNonVoters
49.185198413000 github.com/cockroachdb/cockroach/pkg/kv/kvserver: TestReplicateQueueDecommissioningNonVoters
48.835447316000 github.com/cockroachdb/cockroach/pkg/kv/kvserver: TestResetQuorum
42.682879684000 github.com/cockroachdb/cockroach/pkg/kv/kvserver/protectedts/ptstorage: TestStorage/Protect_-_unlimited_bytes
41.607149644000 github.com/cockroachdb/cockroach/pkg/kv/kvserver: TestReplicateQueueRebalanceMultiStore/simple
41.130417495000 github.com/cockroachdb/cockroach/pkg/kv/kvserver: TestStoreRangeMergeTimestampCache
AVG_DURATION_SEC TEST_NAME
88.719246032000 github.com/cockroachdb/cockroach/pkg/kv/kvserver: TestReplicateQueueSwapVotersWithNonVoters
67.954845606000 github.com/cockroachdb/cockroach/pkg/kv/kvserver: TestReplicateQueueRebalanceMultiStore
59.736863905000 github.com/cockroachdb/cockroach/pkg/kv/kvserver/protectedts/ptstorage: TestStorage
52.481829026000 github.com/cockroachdb/cockroach/pkg/kv/kvserver: TestMergeQueueSeesNonVoters
49.185198413000 github.com/cockroachdb/cockroach/pkg/kv/kvserver: TestReplicateQueueDecommissioningNonVoters
48.835447316000 github.com/cockroachdb/cockroach/pkg/kv/kvserver: TestResetQuorum
42.682879684000 github.com/cockroachdb/cockroach/pkg/kv/kvserver/protectedts/ptstorage: TestStorage/Protect_-_unlimited_bytes
41.607149644000 github.com/cockroachdb/cockroach/pkg/kv/kvserver: TestReplicateQueueRebalanceMultiStore/simple
41.130417495000 github.com/cockroachdb/cockroach/pkg/kv/kvserver: TestStoreRangeMergeTimestampCache
// When the server shuts down there may be proposals inflight. They may have
// a trace span attached to them, so close those out properly. This is mostly
// to appease the span leak check in TestCluster.
//
// TODO(during review): this doesn't actually fix it, when you make the skip
// in TestReplicaRemovalClosesProposalQuota unconditional we still leak the
// same spans within ~a minute.
stopper.AddCloser(stop.CloserFn(func() {
s.VisitReplicas(func(repl *Replica) (wantMore bool) {
// NB: we may not need raftMu but doesn't hurt either.
<pkg>: <short description - lowercase, no final period>
<what was there before: Previously, ...>
<why it needed to change: This was inadequate because ...>
<what you did about it: To address this, this patch ...>
# Note: to disable this commit template, run: git config --global --add cockroachdb.disable-commit-template true
Release justification:
#Release note: None
--- FAIL: TestMVCCStatsRandomized/userspace (0.04s)
--- FAIL: TestMVCCStatsRandomized/userspace/inline=false (0.04s)
mvcc_stats_test.go:1845: seed: 5946155527612219895
mvcc_stats_test.go:1649: 1.524851328,3 Del txn=<none>
mvcc_stats_test.go:1649: 4.943406208,8 DelRange txn=<none>
mvccRangeDel={/Meta1/-foo\x00}, returnKeys=false, max=0
stats delta: {"GCBytesAge":-100,"RangeKeyCount":1,"RangeKeyBytes":18,"RangeValCount":1,"RangeValBytes":7}
absolute: {"GCBytesAge":-123,"KeyBytes":16,"KeyCount":1,"ValBytes":7,"ValCount":1,"RangeKeyCount":1,"RangeKeyBytes":18,"RangeValCount":1,"RangeValBytes":7}
mvcc_stats_test.go:1649: 5.265516864,8 GC txn=<none>
2.191204235,0
#!/usr/bin/env bash
set -euo pipefail
echo $#
if [ $# -lt 5 ]; then
echo "Usage: $0 bench.txt someBenchVar A B C"
echo " ^ "
echo " | "
echo " old "
exit 1
This file has been truncated, but you can view the full file.
=== RUN TestKVNemesisMultiNode
test_log_scope.go:73: test logs captured to: /go/src/github.com/cockroachdb/cockroach/artifacts/logTestKVNemesisMultiNode079909290
test_log_scope.go:74: use -show-logs to present logs inline
panic: test timed out after 40m0s
goroutine 829917 [running]:
testing.(*M).startAlarm.func1()
/usr/local/go/src/testing/testing.go:1700 +0xe5
created by time.goFunc
/usr/local/go/src/time/sleep.go:180 +0x45
This file has been truncated, but you can view the full file.
goroutine 218101407 [running]:
github.com/cockroachdb/cockroach/pkg/server.(*statusServer).Stacks(0xc00589e840, 0x5a4e4e0, 0xc0060ee150, 0xc0133c2f60, 0xc00589e840, 0x0, 0x0)
/go/src/github.com/cockroachdb/cockroach/pkg/server/status.go:1196 +0x185
github.com/cockroachdb/cockroach/pkg/server/serverpb._Status_Stacks_Handler.func1(0x5a4e4e0, 0xc0060ee0c0, 0x4a19660, 0xc0133c2f60, 0x0, 0x0, 0x0, 0x0)
/go/src/github.com/cockroachdb/cockroach/pkg/server/serverpb/status.pb.go:4779 +0x8b
github.com/cockroachdb/cockroach/pkg/util/tracing.ServerInterceptor.func1(0x5a4e4e0, 0xc0060ee0c0, 0x4a19660, 0xc0133c2f60, 0xc0133c2f80, 0xc0133c2fa0, 0x0, 0x0, 0x0, 0x0)
/go/src/github.com/cockroachdb/cockroach/pkg/util/tracing/grpc_interceptor.go:126 +0x4a9
google.golang.org/grpc.getChainUnaryHandler.func1(0x5a4e4e0, 0xc0060ee0c0, 0x4a19660, 0xc0133c2f60, 0xc0020f2990, 0xca72c8, 0x48dd840, 0xc016d27a40)
/go/src/github.com/cockroachdb/cockroach/vendor/google.golang.org/grpc/server.go:921 +0xe7
github.com/cockroachdb/cockroach/