zoyi / bingodb

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[index 이름을 가진 서브 인덱스에 대해 hashKey가 hash, sortKey가 sort 인 아이템을 찾는 API] 에러

DevYu89 opened this issue · comments

아래 API 에서 에러가 발생합니다.
https://github.com/zoyi/bingodb#get-tablestableindicesindexhashhashsortsort

[bingodb-1]2017-09-15T09:03:03.749817080Z 2017/09/15 09:03:03 1.750 #0000000500000004 - 172.17.0.10:80<->59.29.232.172:37907 - GET http://bingo.channel.io:4052/tables/onlines/indices/guest?hash=7&sort=7%3AUser%3A215 - GET at /tables/onlines/indices/guest
[bingodb-1]2017-09-15T09:03:03.752085614Z panic: runtime error: invalid memory address or nil pointer dereference
[bingodb-1]2017-09-15T09:03:03.752099835Z [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x69a95e]
[bingodb-1]2017-09-15T09:03:03.752104635Z
[bingodb-1]2017-09-15T09:03:03.752108121Z goroutine 111 [running]:
[bingodb-1]2017-09-15T09:03:03.752118266Z github.com/zoyi/bingodb.(*SubIndex).Get(0xc42010ef00, 0x6d51a0, 0xc420288460, 0x6d51a0, 0xc420288480, 0xc420288480, 0x619125)
[bingodb-1]2017-09-15T09:03:03.752122317Z :1 +0x2e
[bingodb-1]2017-09-15T09:03:03.752126068Z github.com/zoyi/bingodb/api.(*Resource).Get(0xc42000e0b8, 0xc42020e000)
[bingodb-1]2017-09-15T09:03:03.752129985Z /go/src/github.com/zoyi/bingodb/api/resource.go:95 +0x106
[bingodb-1]2017-09-15T09:03:03.752142408Z github.com/zoyi/bingodb/api.(*Resource).Get-fm(0xc42020e000)
[bingodb-1]2017-09-15T09:03:03.752145634Z /go/src/github.com/zoyi/bingodb/api/api.go:36 +0x34
[bingodb-1]2017-09-15T09:03:03.752152037Z github.com/zoyi/bingodb/api.cors.func1(0xc42020e000)
[bingodb-1]2017-09-15T09:03:03.752155132Z /go/src/github.com/zoyi/bingodb/api/api.go:55 +0x12b
[bingodb-1]2017-09-15T09:03:03.752157983Z github.com/zoyi/bingodb/api.logging.func1(0xc42020e000)
[bingodb-1]2017-09-15T09:03:03.752160911Z /go/src/github.com/zoyi/bingodb/api/api.go:62 +0x1aa
[bingodb-1]2017-09-15T09:03:03.752163857Z github.com/buaazp/fasthttprouter.(*Router).Handler(0xc420071a40, 0xc42020e000)
[bingodb-1]2017-09-15T09:03:03.752166798Z /go/src/github.com/buaazp/fasthttprouter/router.go:300 +0x9d5
[bingodb-1]2017-09-15T09:03:03.752169729Z github.com/buaazp/fasthttprouter.(*Router).Handler-fm(0xc42020e000)
[bingodb-1]2017-09-15T09:03:03.752172641Z /go/src/github.com/zoyi/bingodb/cmd/bingodb/bingodb.go:25 +0x34
[bingodb-1]2017-09-15T09:03:03.752179287Z github.com/valyala/fasthttp.(*Server).serveConn(0xc4200e0500, 0x8d40c0, 0xc420172038, 0x42a501, 0xc400030101)
[bingodb-1]2017-09-15T09:03:03.752182461Z /go/src/github.com/valyala/fasthttp/server.go:1555 +0x747
[bingodb-1]2017-09-15T09:03:03.752185537Z github.com/valyala/fasthttp.(*Server).(github.com/valyala/fasthttp.serveConn)-fm(0x8d40c0, 0xc420172038, 0x59bb9701, 0x39b44)
[bingodb-1]2017-09-15T09:03:03.752188605Z /go/src/github.com/valyala/fasthttp/server.go:1269 +0x3e
[bingodb-1]2017-09-15T09:03:03.752192041Z github.com/valyala/fasthttp.(*workerPool).workerFunc(0xc420124800, 0xc42026b7e0)
[bingodb-1]2017-09-15T09:03:03.752197736Z /go/src/github.com/valyala/fasthttp/workerpool.go:210 +0xdc
[bingodb-1]2017-09-15T09:03:03.752200790Z github.com/valyala/fasthttp.(*workerPool).getCh.func1(0xc420124800, 0xc42026b7e0, 0x6c8f40, 0xc42026b7e0)
[bingodb-1]2017-09-15T09:03:03.752203939Z /go/src/github.com/valyala/fasthttp/workerpool.go:182 +0x35
[bingodb-1]2017-09-15T09:03:03.752206883Z created by github.com/valyala/fasthttp.(*workerPool).getCh
[bingodb-1]2017-09-15T09:03:03.752212877Z /go/src/github.com/valyala/fasthttp/workerpool.go:181 +0x13c

Attempt to fix at #37