Skip to content

Instantly share code, notes, and snippets.

View jameshartig's full-sized avatar

James Hartig jameshartig

View GitHub Profile
@jameshartig
jameshartig / 40846.go
Last active August 18, 2020 19:53
reproduction of golang/go#40846
package main
import (
"context"
"fmt"
"math/rand"
"os"
"os/signal"
"syscall"
"time"
@jameshartig
jameshartig / run.sh
Last active October 22, 2019 17:30
Repo for yugabyte/yugabyte-db #2616
#!/bin/bash
set -e
yum install -y wget
mkdir -p /opt/misc
pushd /opt/misc
wget https://downloads.yugabyte.com/yugabyte-2.0.1.0-linux.tar.gz
tar xf yugabyte-2.0.1.0-linux.tar.gz
@jameshartig
jameshartig / debug.log
Created July 27, 2019 14:04
Consul TTL Issue
2019/07/27 13:38:09 [DEBUG] agent: Check "agreement-api-debug-10.128.15.247-24465-ttl-alive" in sync
2019/07/27 13:38:09 [DEBUG] agent: Check "agreement-api-debug-10.128.15.247-20721-ttl-alive" in sync
2019/07/27 13:38:09 [DEBUG] agent: Check "agreement-api-services-10.128.15.247-22584-ttl-alive" in sync
2019/07/27 13:38:09 [DEBUG] agent: Check "service:agreement-api-services-10.128.15.247-22584:2" in sync
2019/07/27 13:38:09 [DEBUG] agent: Check "agreement-api-services-10.128.15.247-22584-ttl-alive" status is now passing
2019/07/27 13:38:09 [DEBUG] agent: Service "agreement-api-services-10.128.15.247-22584" in sync
2019/07/27 13:38:09 [DEBUG] agent: Service "agreement-api-debug-10.128.15.247-20721" in sync
2019/07/27 13:38:09 [DEBUG] agent: Service "agreement-api-debug-10.128.15.247-24465" in sync
2019/07/27 13:38:09 [DEBUG] agent: Check "agreement-api-services-10.128.15.247-22584-ttl-alive" in sync
2019/07/27 13:38:09 [DEBUG] agent: Check "service:agreement-api-services-10.128.15.247-22584:2" in sync
@jameshartig
jameshartig / main.go
Last active July 10, 2019 01:26
Reproduction for #1485
package main
import (
"context"
"flag"
"math/rand"
"net/http"
_ "net/http/pprof"
"os"
"os/signal"
var c radix.Client
var raw resp2.RawMessage
err = conn.Do(radix.Cmd(&raw, "CLUSTER", "SLOTS"))
if err == nil {
var ct radix.ClusterTopo
var rerr resp2.Error
if ct.UnmarshalRESP(bufio.NewReaderSize(bytes.NewReader(raw), len(raw))) == nil {
c, err = radix.NewCluster([]string{ar.Addr},
radix.ClusterPoolFunc(df),
)
@jameshartig
jameshartig / main.go
Last active December 11, 2018 19:23
Reproduction for #1247
package main
import (
"context"
"flag"
"math/rand"
"net/http"
_ "net/http/pprof"
"os"
"os/signal"
@jameshartig
jameshartig / main.go
Last active October 16, 2018 15:26
Reproduction for #1177
package main
import (
"context"
"flag"
"math/rand"
"net/http"
_ "net/http/pprof"
"os"
"os/signal"
package main
import (
"flag"
"io"
"log"
"net"
"runtime"
"sync/atomic"
"time"
@jameshartig
jameshartig / main.go
Created February 1, 2018 23:09
Pubsub 15 minute delayed acks
package main
import (
"context"
"time"
"github.com/levenlabs/go-llog"
"cloud.google.com/go/pubsub"
"google.golang.org/grpc/codes"
package corednslmetric
import (
"fmt"
"log"
"net"
"net/http"
"bitbucket.org/levenlabs/llib/lmetric"
"github.com/coredns/coredns/plugin/metrics"
"github.com/gogo/protobuf/proto"
"github.com/prometheus/client_golang/prometheus"