patrobinson / gokini

A pure Golang port of the Kinesis Consumer Library
MIT License
60 stars 8 forks source link

Integration test failure: TestRebalance #9

Closed arl closed 4 years ago

arl commented 5 years ago

I just downloaded and installed gokini and ran integration tests, they failed on TestRebalance, here is the log and then some details about my platform:

 aurelien-> make docker-integration
Creating network "gokini_default" with the default driver
Creating gokini_kinesis_1  ... done
Creating gokini_dynamodb_1 ... done
INFO[0000] Using dynamodb endpoint from environment http://dynamodb:8000
INFO[0000] Using dynamodb endpoint from environment http://dynamodb:8000
INFO[0000] Using dynamodb endpoint from environment http://dynamodb:8000
INFO[0000] Using dynamodb endpoint from environment http://dynamodb:8000
INFO[0000] Using dynamodb endpoint from environment http://dynamodb:8000
INFO[0000] Shutting down
INFO[0001] Shutting down
INFO[0001] Shutting down
INFO[0002] Using dynamodb endpoint from environment http://dynamodb:8000
INFO[0002] Shutting down
INFO[0004] Using dynamodb endpoint from environment http://dynamodb:8000
seqenceID: 49600994170067648314194997288822114577672002812487139330, processed 1 time(s)
INFO[0004] Shutting down
INFO[0005] Using dynamodb endpoint from environment http://dynamodb:8000
INFO[0005] Shutting down
INFO[0007] Using dynamodb endpoint from environment http://dynamodb:8000
INFO[0007] Shutting down
INFO[0008] Using dynamodb endpoint from environment http://dynamodb:8000
INFO[0009] Shutting down
INFO[0011] Using dynamodb endpoint from environment http://dynamodb:8000
INFO[0011] Using dynamodb endpoint from environment http://dynamodb:8000
INFO[0013] Shutting down
INFO[0013] Shutting down
--- FAIL: TestRebalance (3.27s)
        integration_test.go:222: Expected consumer to have 1 shard, it has 2
        integration_test.go:225: Expected consumer to have 1 shard, it has 0
INFO[0014] Using dynamodb endpoint from environment http://dynamodb:8000
INFO[0014] Shutting down
INFO[0016] Using dynamodb endpoint from environment http://dynamodb:8000
INFO[0016] Shutting down
FAIL
exit status 1
FAIL    github.com/patrobinson/gokini   17.380s
Makefile:10: recipe for target 'integration' failed
make: *** [integration] Error 1
Makefile:13: recipe for target 'docker-integration' failed
make: *** [docker-integration] Error 2
O_O [gokini]

Git:

aurelien-> git rev-parse HEAD && git status
2a9eab62331836cc23d97c4d7d4117ed7f874eaf
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
^_^ [gokini]

Go:

 aurelien-> go version
go version go1.13.4 linux/amd64
^_^ [gokini]
 aurelien-> go version && go env
go version go1.13.4 linux/amd64
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/aurelien/.cache/go-build"
GOENV="/home/aurelien/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/aurelien/godev"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/aurelien/godev/src/github.com/patrobinson/gokini/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build417146688=/tmp/go-build -gno-record-gcc-switches"

Platform: linux-amd64

arl commented 5 years ago

I ran make docker-integration 3 times after that and it passed the 3 times. So I don't know it the test is flacky or fails on the first launch

patrobinson commented 5 years ago

This is a flakey test from my experience. Leaving this issue open as we should fix it.

It's a race condition I believe, the shards will eventually rebalance themselves but it can take time to do this.

patrobinson commented 4 years ago

This was actually a concurrency bug. fixed in latest release