zoyi / bingodb

6 stars 1 forks source link

데이터 PUT 할 때 updatedAt에 null이 들어갔을 때 문제 #38

Open DevYu89 opened 7 years ago

DevYu89 commented 7 years ago

PUT 할 때 expiresAt에 null이 들어가면 문제가 발생함.

Request URL : http://bingo.channel.io:4052/tables/sockets Body params { "$set": { "id": "socket_1", "personKey": "1:User:1382", "updatedAt": 1505261495281, "expiresAt": null }, "$setOnInsert": { "createdAt": 1505261495281 } }

[bingodb-1]2017-09-19T06:36:49.487623347Z github.com/zoyi/bingodb.(Document).GetExpiresAt(...) [bingodb-1]2017-09-19T06:36:49.487627387Z /go/src/github.com/zoyi/bingodb/document.go:82 [bingodb-1]2017-09-19T06:36:49.487631333Z github.com/zoyi/bingodb.(Keeper).put(0xc42010eb40, 0xc420064980, 0xc4203befe0) [bingodb-1]2017-09-19T06:36:49.487634735Z /go/src/github.com/zoyi/bingodb/keeper.go:65 +0x1af [bingodb-1]2017-09-19T06:36:49.487652825Z github.com/zoyi/bingodb.(Table).Put(0xc420064980, 0xc420239a60, 0xc420239a68, 0xc420212d80, 0x20, 0x30) [bingodb-1]2017-09-19T06:36:49.487657138Z /go/src/github.com/zoyi/bingodb/table.go:230 +0x1f7 [bingodb-1]2017-09-19T06:36:49.487661449Z github.com/zoyi/bingodb/api.(Resource).Put(0xc42000e0b8, 0xc42017e000) [bingodb-1]2017-09-19T06:36:49.487665049Z /go/src/github.com/zoyi/bingodb/api/resource.go:111 +0xc6 [bingodb-1]2017-09-19T06:36:49.487668649Z github.com/zoyi/bingodb/api.(Resource).Put-fm(0xc42017e000) [bingodb-1]2017-09-19T06:36:49.487672078Z /go/src/github.com/zoyi/bingodb/api/api.go:42 +0x34 [bingodb-1]2017-09-19T06:36:49.487675530Z github.com/zoyi/bingodb/api.cors.func1(0xc42017e000) [bingodb-1]2017-09-19T06:36:49.487679012Z /go/src/github.com/zoyi/bingodb/api/api.go:55 +0x12b [bingodb-1]2017-09-19T06:36:49.487683998Z github.com/zoyi/bingodb/api.logging.func1(0xc42017e000) [bingodb-1]2017-09-19T06:36:49.487687375Z /go/src/github.com/zoyi/bingodb/api/api.go:62 +0x1aa [bingodb-1]2017-09-19T06:36:49.487691099Z github.com/buaazp/fasthttprouter.(Router).Handler(0xc420071a40, 0xc42017e000) [bingodb-1]2017-09-19T06:36:49.487694484Z /go/src/github.com/buaazp/fasthttprouter/router.go:300 +0x9d5 [bingodb-1]2017-09-19T06:36:49.487697904Z github.com/buaazp/fasthttprouter.(Router).Handler-fm(0xc42017e000) [bingodb-1]2017-09-19T06:36:49.487701264Z /go/src/github.com/zoyi/bingodb/cmd/bingodb/bingodb.go:25 +0x34 [bingodb-1]2017-09-19T06:36:49.487709472Z github.com/valyala/fasthttp.(Server).serveConn(0xc4200e0500, 0x8d40c0, 0xc42020cdc8, 0xc420064901, 0x6d0101) [bingodb-1]2017-09-19T06:36:49.487722562Z /go/src/github.com/valyala/fasthttp/server.go:1555 +0x747 [bingodb-1]2017-09-19T06:36:49.487738827Z github.com/valyala/fasthttp.(Server).(github.com/valyala/fasthttp.serveConn)-fm(0x8d40c0, 0xc42020cdc8, 0x59c0bb01, 0x6d85e0) [bingodb-1]2017-09-19T06:36:49.487750750Z /go/src/github.com/valyala/fasthttp/server.go:1269 +0x3e [bingodb-1]2017-09-19T06:36:49.487755120Z github.com/valyala/fasthttp.(workerPool).workerFunc(0xc420124800, 0xc4203c2d60) [bingodb-1]2017-09-19T06:36:49.487758346Z /go/src/github.com/valyala/fasthttp/workerpool.go:210 +0xdc [bingodb-1]2017-09-19T06:36:49.487761393Z github.com/valyala/fasthttp.(workerPool).getCh.func1(0xc420124800, 0xc4203c2d60, 0x6c8f40, 0xc4203c2d60) [bingodb-1]2017-09-19T06:36:49.487764647Z /go/src/github.com/valyala/fasthttp/workerpool.go:182 +0x35 [bingodb-1]2017-09-19T06:36:49.487767784Z created by github.com/valyala/fasthttp.(workerPool).getCh [bingodb-1]2017-09-19T06:36:49.487770828Z /go/src/github.com/valyala/fasthttp/workerpool.go:181 +0x13c