Skip to content

Instantly share code, notes, and snippets.

View nvanbenschoten's full-sized avatar

Nathan VanBenschoten nvanbenschoten

  • Cockroach Labs
  • New York, New York
View GitHub Profile
@nvanbenschoten
nvanbenschoten / bindings.json
Last active August 17, 2020 17:57
Reviewable Bindings
[
["f", "Show next/latest diffs", "setProposedDiffBounds()"],
["n", "Next unreviewed file", "nextUnreviewedFile()"],
["p", "Previous unreviewed file", "prevUnreviewedFile()"],
[null, "Next personally unreviewed file", "nextPersonallyUnreviewedFile()"],
[null, "Previous personally unreviewed file", "prevPersonallyUnreviewedFile()"],
["shift+n", "Next changed file", "nextChangedFile()"],
["shift+p", "Previous changed file", "prevChangedFile()"],
[null, "Next visible file", "nextVisibleFile()"],
@nvanbenschoten
nvanbenschoten / trace_1.txt
Created July 8, 2020 18:36
Missing row traces - issue #513
timestamp | age | message | tag | location | operation | span
-----------------------------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@nvanbenschoten
nvanbenschoten / gist:3cffff71d9847e09e366bfaeed0f15b4
Created June 8, 2020 22:04
bulkio: error from ingestKvs causes deadlock
goroutine 2083 [running]:
runtime/pprof.writeGoroutineStacks(0x7f7870ab6db8, 0xc0026ba3c0, 0x0, 0x0)
/usr/local/go/src/runtime/pprof/pprof.go:679 +0x9d
runtime/pprof.writeGoroutine(0x7f7870ab6db8, 0xc0026ba3c0, 0x2, 0xc012688100, 0xc003dbf720)
/usr/local/go/src/runtime/pprof/pprof.go:668 +0x44
runtime/pprof.(*Profile).WriteTo(0x7a2cac0, 0x7f7870ab6db8, 0xc0026ba3c0, 0x2, 0xc0026ba3c0, 0xd)
/usr/local/go/src/runtime/pprof/pprof.go:329 +0x3da
net/http/pprof.handler.ServeHTTP(0xc00b522011, 0x9, 0x5397820, 0xc0026ba3c0, 0xc002cd2400)
/usr/local/go/src/net/http/pprof/pprof.go:245 +0x33a
net/http/pprof.Index(0x5397820, 0xc0026ba3c0, 0xc002cd2400)
@nvanbenschoten
nvanbenschoten / int_map.go
Created May 20, 2020 19:39
#46793 - attempt to reproduce
// Copyright 2019 The Cockroach Authors.
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.txt.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0, included in the file
// licenses/APL.txt.
root@localhost:26257/defaultdb> EXPLAIN (ENV, OPT) select i_id from tpcc.item where i_id = 10;
text
+-----------------------------------------------------------------------------------------------------------------------------+
Version: CockroachDB CCL v19.1.0-beta.20190318-712-g5c2cc21 (x86_64-unknown-linux-gnu, built 2019/04/08 17:20:28, go1.11.6)
CREATE TABLE item (
i_id INT8 NOT NULL,
i_im_id INT8 NULL,
i_name VARCHAR(24) NULL,
i_price DECIMAL(5,2) NULL,
@nvanbenschoten
nvanbenschoten / SuccessiveClickUtil
Last active August 29, 2015 13:57
An Android utility class handling successive clicks in a given amount of time. Useful for easter eggs or extending default click behavior to more complicated situations.
/**
* Util class handling successive clicks in a given amount of time.
* Useful for easter eggs or extending default click behavior to more
* complicated situations.
*
* Created by Nathan VanBenschoten on 4/1/2014.
* Copyright (c) 2014 Tablelist LLC. All rights reserved.
*/
public class SuccessiveClickUtil {