Skip to content

SpecScans query provides all records instead of sub-set. #6

@vkuznet

Description

@vkuznet

We identified that using specific did query instead of records associated with that did we got all queries and that requires a fix.

Here are few stuff from the log:

[2024-10-24 11:37:42.356754107 -0400 EDT m=+78464.300186127] 2024/10/24 11:37:42 /home/chessdata_svc/FOXDEN/SpecScansService/handlers.go:136: service request: {Client:foxden ServiceQuery:{Query:/beamline=3a/btr=4214-a/cycle=2024-3/sample_name=overnight_1021 Spec:<nil> SQL: Idx:0 Limit:-1 SortKeys:[] SortOrder:0}}

...

[2024-10-24 10:40:30.956429523 -0400 EDT m=+75032.899861554] 2024/10/24 10:40:30 /home/chessdata_svc/FOXDEN/golib/services/helpers.go:47: ERROR: ht
tp code 500 srv code 123 error json: cannot unmarshal number 325 into Go struct field UserRecord.scan_number of type int8

Stack of 2048 bytes: goroutine 13398 [running]:
github.com/CHESSComputing/golib/utils.Stack()
        /home/chessdata_svc/FOXDEN/golib/utils/utils.go:46 +0x3a
github.com/CHESSComputing/golib/services.Response({0xe5ccf9, 0x9}, 0x1f4, 0x200000003?, {_, _})
        /home/chessdata_svc/FOXDEN/golib/services/helpers.go:47 +0xdb
main.AddHandler(0xc00043a200)
        /home/chessdata_svc/FOXDEN/SpecScansService/handlers.go:45 +0x5f0
github.com/gin-gonic/gin.(*Context).Next(0xc00043a200)
        /home/chessdata_svc/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 +0x2b
github.com/CHESSComputing/golib/server.Router.ScopeTokenMiddleware.func6(0xc00043a200)
        /home/chessdata_svc/FOXDEN/golib/authz/middleware.go:76 +0x3b1
github.com/gin-gonic/gin.(*Context).Next(0xc00043a200)
        /home/chessdata_svc/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 +0x2b
github.com/CHESSComputing/golib/server.Router.Sessions.func2(0xc00043a200)
        /home/chessdata_svc/go/pkg/mod/github.com/gin-contrib/sessions@v0.0.5/sessions.go:54 +0x165
github.com/gin-gonic/gin.(*Context).Next(0xc00043a200)
        /home/chessdata_svc/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 +0x2b
github.com/CHESSComputing/golib/server.Router.LoggerMiddleware.func1(0xc00043a200)
        /home/chessdata_svc/FOXDEN/golib/server/middleware.go:143 +0xe9
github.com/gin-gonic/gin.(*Context).Next(...)
        /home/chessdata_svc/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0xc0000d4000, 0xc00043a200)
        /home/chessdata_svc/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:633 +0x892
github.com/gin-gonic/gin.(*Engine).ServeHTTP(0xc0000d4000, {0xfa8910, 0xc000070058}, 0xc0002fcf00)
        /home/chessdata_svc/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:589 +0x1b2
net/http.serverHandler.ServeHTTP({0x0?}, {0xfa8910?, 0xc000070058?}, 0x0?)
        /home/chessdata_svc/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.2.linux-amd64/src/net/http/server.go:3210 +0x8e
net/http.initALPNRequest.ServeHTTP({{0xfaa008?, 0xc0004b8270?}, 0xc000131888?, {0xc00013c870?}}, {0xfa8910, 0

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions