This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package cgosleep | |
/* | |
#include "unistd.h" | |
void sleepMicros(unsigned int micros) { | |
usleep(micros); | |
} | |
*/ | |
import "C" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/google.golang.org/grpc/call.go b/google.golang.org/grpc/call.go | |
index c1588c63..e1286dda 100644 | |
--- a/google.golang.org/grpc/call.go | |
+++ b/google.golang.org/grpc/call.go | |
@@ -35,6 +35,7 @@ package grpc | |
import ( | |
"bytes" | |
+ "fmt" | |
"io" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make sure that you’ve installed minikube and run `minikube start` to get your Kubernetes cluster running. | |
minikube version (should be at least 0.19.0) | |
minikube start | |
kubectl version (should be at least 1.6.0 for both client and server) | |
------------------- | |
# Create the CockroachDB cluster and other relevant resources | |
kubectl create -f https://bit.ly/crdb-k8s-yaml | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"crypto/rand" | |
"fmt" | |
"os" | |
"os/exec" | |
) | |
func main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
# This service is meant to be used by clients of the database. It exposes a ClusterIP that will | |
# automatically load balance connections to the different database pods. | |
name: cockroachdb-public | |
labels: | |
app: cockroachdb | |
spec: | |
ports: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
# This service is meant to be used by clients of the database. It exposes a ClusterIP that will | |
# automatically load balance connections to the different database pods. | |
name: cockroachdb-public | |
labels: | |
app: cockroachdb | |
spec: | |
ports: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
crl-ssh alex-chaos all 'grep "process[ei][dn]g* compaction" logs/cockroach.alex-chaos-*' | |
1: alex@35.196.44.2 | |
logs/cockroach.alex-chaos-0001.root.2018-01-18T03_25_59Z.011338.log:I180118 04:59:13.091160 10505 storage/compactor/compactor.go:308 [n1,s1] processing compaction #1-23/179 (/System/""-/Table/51) for 284 MiB | |
logs/cockroach.alex-chaos-0001.root.2018-01-18T03_25_59Z.011338.log:I180118 04:59:53.415386 10505 storage/compactor/compactor.go:316 [n1,s1] processed compaction #1-23/179 (/System/""-/Table/51) for 284 MiB in 40.324252369s | |
logs/cockroach.alex-chaos-0001.root.2018-01-18T03_25_59Z.011338.log:I180118 05:20:58.034031 10505 storage/compactor/compactor.go:308 [n1,s1] processing compaction #110-116/177 (/Table/51/1/579472353641439108-/Table/51/1/865982641441952695) for 260 MiB | |
logs/cockroach.alex-chaos-0001.root.2018-01-18T03_25_59Z.011338.log:I180118 05:39:51.074715 10505 storage/compactor/compactor.go:316 [n1,s1] processed compaction #110-116/177 (/Table/51/1/579472353641439108-/Table/51/1/86598264 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker kill node1 | |
docker kill node2 | |
docker kill node3 | |
docker rm node1 | |
docker rm node2 | |
docker rm node3 | |
docker network rm net1 | |
docker network rm net2 | |
docker network rm net3 | |
rm -rf ./cockroach-data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker network disconnect "${PWD##*/}_shared" roach-4 | |
docker network disconnect "${PWD##*/}_shared" roach-5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE customers ( | |
id integer PRIMARY KEY, | |
name text | |
); | |
CREATE TABLE accounts ( | |
customer_id integer REFERENCES customers(id), | |
id integer PRIMARY KEY, | |
balance numeric, | |
CONSTRAINT accounts_balance_check CHECK ((balance > (0)::numeric)) |
OlderNewer