bug: oomcli snapshot failed
Closed this issue · 0 comments
lianxmfor commented
recurrent:
(base) ➜ oomstore git:(custom-snapshot-inteval) ✗ oomcli init
(base) ➜ oomstore git:(custom-snapshot-inteval) ✗ oomcli apply -f /tmp/oomstore/meta.yaml
applied
(base) ➜ oomstore git:(custom-snapshot-inteval) ✗ oomcli get meta entity -o yaml
items:
- kind: Entity
name: device
description: device
groups:
- name: phone
category: batch
description: phone
features:
- name: price
value-type: int64
description: price
- name: model
value-type: string
description: model
- kind: Entity
name: user
description: user
groups:
- name: student
category: batch
description: student
features:
- name: age
value-type: int64
description: age
- name: user-click
category: stream
description: user click post feature
features:
- name: last_5_click_posts
value-type: string
description: user last 5 click posts
- name: number_of_user_started_posts
value-type: int64
description: number of posts that users stared today
(base) ➜ oomstore git:(custom-snapshot-inteval) ✗ oomcli push --entity-key 1 --group user-click --features last_5_click_posts=2,3,4,5,6 --features number_of_user_started_posts=10
succeeded
(base) ➜ oomstore git:(custom-snapshot-inteval) ✗ oomcli push --entity-key 1 --group user-click --features last_5_click_posts=2,3,4,5,6 --features number_of_user_started_posts=11
succeeded
(base) ➜ oomstore git:(custom-snapshot-inteval) ✗ export DEBUG=1
(base) ➜ oomstore git:(custom-snapshot-inteval) ✗ oomcli snapshot user-click
Error: failed to take snapshot for the group user-click: pq: syntax error at or near ")"
github.com/oom-ai/oomstore/pkg/errdefs.WithStack
/Users/lianxm/github.com/oomstore/pkg/errdefs/wrap.go:33
github.com/oom-ai/oomstore/internal/database/dbutil.(*DBOpt).ExecContext
/Users/lianxm/github.com/oomstore/internal/database/dbutil/db_opt.go:37
github.com/oom-ai/oomstore/internal/database/offline/sqlutil.Snapshot
/Users/lianxm/github.com/oomstore/internal/database/offline/sqlutil/snapshot.go:88
github.com/oom-ai/oomstore/internal/database/offline/postgres.(*DB).Snapshot
/Users/lianxm/github.com/oomstore/internal/database/offline/postgres/store.go:56
github.com/oom-ai/oomstore/pkg/oomstore.(*OomStore).Snapshot
/Users/lianxm/github.com/oomstore/pkg/oomstore/snapshot.go:43
github.com/oom-ai/oomstore/oomcli/cmd.glob..func34
/Users/lianxm/github.com/oomstore/oomcli/cmd/snapshot.go:24
github.com/spf13/cobra.(*Command).execute
/Users/lianxm/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:860
github.com/spf13/cobra.(*Command).ExecuteC
/Users/lianxm/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:974
github.com/spf13/cobra.(*Command).Execute
/Users/lianxm/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:902
github.com/oom-ai/oomstore/oomcli/cmd.Execute
/Users/lianxm/github.com/oomstore/oomcli/cmd/root.go:32
main.main
/Users/lianxm/github.com/oomstore/oomcli/main.go:6
runtime.main
/Users/lianxm/local/go/src/runtime/proc.go:255
runtime.goexit
/Users/lianxm/local/go/src/runtime/asm_amd64.s:1581