Skip to content

Instantly share code, notes, and snippets.

View tbg's full-sized avatar

Tobias Grieger tbg

View GitHub Profile
#!/usr/bin/env bash
set -euo pipefail
# NB: invoke this script with "caffeinate" on OSX and/or linux to
# avoid computer going to standby.
run=${1-none}
sha=$(git rev-parse --short HEAD)
abase="artifacts/${sha}"
@tbg
tbg / 20.2-20.1.diff
Created March 11, 2021 10:00
git diff release-20.1 -- ./pkg/kv/kvclient/kvcoord/txn_interceptor_span_refresher.go
diff --git a/pkg/kv/kvclient/kvcoord/txn_interceptor_span_refresher.go b/pkg/kv/kvclient/kvcoord/txn_interceptor_span_refresher.go
index a6c400c4d0..4009a4373f 100644
--- a/pkg/kv/kvclient/kvcoord/txn_interceptor_span_refresher.go
+++ b/pkg/kv/kvclient/kvcoord/txn_interceptor_span_refresher.go
@@ -132,6 +132,7 @@ type txnSpanRefresher struct {
refreshFail *metric.Counter
refreshFailWithCondensedSpans *metric.Counter
refreshMemoryLimitExceeded *metric.Counter
+ refreshAutoRetries *metric.Counter
}
GOPATH set to /Users/tschottdorf/go
mkdir -p lib
rm -f lib/lib{geos,geos_c}.dylib
cp -L /Users/tschottdorf/go/native/x86_64-apple-darwin19.5.0/geos/lib/lib{geos,geos_c}.dylib lib
GOFLAGS= go test -json -mod=vendor -exec 'stress -stderr -maxfails 1' -tags ' make x86_64_apple_darwin19.5.0' -ldflags '-X github.com/cockroachdb/cockroach/pkg/build.typ=development -extldflags "" -X "github.com/cockroachdb/cockroach/pkg/build.tag=v20.2.0-alpha.1-1257-g9c5750ec54-dirty" -X "github.com/cockroachdb/cockroach/pkg/build.rev=9c5750ec54d0f7f1c64daf6b5cbe9cd31027bf68" -X "github.com/cockroachdb/cockroach/pkg/build.cgoTargetTriple=x86_64-apple-darwin19.5.0" ' -run "." -timeout 0 ./pkg/util/stop/ -v -args -test.timeout 30m
{"Time":"2020-07-16T12:46:19.716946+02:00","Action":"output","Package":"github.com/cockroachdb/cockroach/pkg/util/stop","Output":"\n"}
{"Time":"2020-07-16T12:46:19.717483+02:00","Action":"run","Package":"github.com/cockroachdb/cockroach/pkg/util/stop","Test":"TestStopper"}
{"Time":"2020-07-16T12:46:19.71
panic: pebble: closed
goroutine 42537 [running]:
github.com/cockroachdb/pebble.(*DB).newIterInternal(0xc001326a80, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc013f226e8, 0xc000089d98)
/go/src/github.com/cockroachdb/cockroach/vendor/github.com/cockroachdb/pebble/db.go:665 +0xd94
github.com/cockroachdb/pebble.(*DB).NewIter(0xc001326a80, 0xc013f226e8, 0x1)
/go/src/github.com/cockroachdb/cockroach/vendor/github.com/cockroachdb/pebble/db.go:804 +0x4b
github.com/cockroachdb/cockroach/pkg/storage.(*pebbleIterator).init(0xc013f226e0, 0x4f54da0, 0xc001326a80, 0x0, 0x0, 0x0, 0x0, 0xc0183ad728, 0x1, 0x8, ...)
/go/src/github.com/cockroachdb/cockroach/pkg/storage/pebble_iterator.go:125 +0x46b
github.com/cockroachdb/cockroach/pkg/storage.newPebbleIterator(0x4f54da0, 0xc001326a80, 0x0, 0x0, 0x0, 0x0, 0xc0183ad728, 0x1, 0x8, 0x0, ...)
I200708 09:30:28.103616 1 rand.go:85 Random seed: -6507006206530939820
=== RUN TestBasicHashShardedIndexes
I200708 09:30:28.126169 9 rpc/tls.go:234 [n?] server certificate addresses: IP=127.0.0.1,::1; DNS=localhost,*.local; CN=node
I200708 09:30:28.126277 9 rpc/tls.go:280 [n?] web UI certificate addresses: IP=127.0.0.1,::1; DNS=localhost,*.local; CN=node
W200708 09:30:28.127317 9 server/status/runtime.go:310 [n?] Could not parse build timestamp: parsing time "" as "2006/01/02 15:04:05": cannot parse "" as "2006"
I200708 09:30:28.149823 9 server/server.go:803 [n?] monitoring forward clock jumps based on server.clock.forward_jump_check_enabled
I200708 09:30:28.155228 9 server/config.go:600 [n?] 1 storage engine initialized
I200708 09:30:28.155791 9 server/config.go:603 [n?] Pebble cache size: 128 MiB
I200708 09:30:28.156789 9 server/config.go:603 [n?] store 0: in-memory, size 0 B
I200708 09:30:28.181816 9 server/server.go:1301 [n?] **** add additional nodes by specifying --join=127.0.0.1:46335
https://teamcity.cockroachdb.com/viewLog.html?buildId=2067228&buildTypeId=Cockroach_UnitTests_Test&tab=buildLog&_focus=5442&state=5442#_state=5442
panic: test timed out after 30m0s
goroutine 2630024 [running]:
testing.(*M).startAlarm.func1()
/usr/local/go/src/testing/testing.go:1459 +0xdf
created by time.goFunc
/usr/local/go/src/time/sleep.go:168 +0x44
cr.node.build.timestamp 2020-06-26T15:58:20Z 1 1.593186309e+09
cr.node.build.timestamp 2020-06-26T15:58:30Z 1 1.593186309e+09
cr.node.build.timestamp 2020-06-26T15:58:40Z 1 1.593186309e+09
cr.node.build.timestamp 2020-06-26T15:58:50Z 1 1.593186309e+09
cr.node.build.timestamp 2020-06-26T15:59:00Z 1 1.593186309e+09
cr.node.build.timestamp 2020-06-26T15:59:10Z 1 1.593186309e+09
cr.node.build.timestamp 2020-06-26T15:59:20Z 1 1.593186309e+09
cr.node.changefeed.buffer_entries.in 2020-06-26T15:58:20Z 1 0
cr.node.changefeed.buffer_entries.in 2020-06-26T15:58:30Z 1 0
cr.node.changefeed.buffer_entries.in 2020-06-26T15:58:40Z 1 0
This file has been truncated, but you can view the full file.
Running make with -j24
GOPATH set to /home/tschottdorf/go
Detected change in build system. Rebooting make.
Running make with -j24
GOPATH set to /home/tschottdorf/go
mkdir -p lib
ln -sf /home/tschottdorf/go/native/x86_64-linux-gnu/geos/lib/lib{geos,geos_c}.so lib
regenerating pkg/cli/zcgo_flags.go
regenerating pkg/server/status/zcgo_flags.go
regenerating pkg/storage/zcgo_flags.go
@tbg
tbg / gist:d309874b0efdb7714cabc38ae4186d27
Last active May 1, 2020 08:44
mangle user and tenantid
package main
import (
"crypto/rand"
"encoding/base64"
"fmt"
"strconv"
"strings"
"golang.org/x/crypto/nacl/secretbox"