It seems that crud is doing two selects in one `crud.get`
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 43
- Forks
- 17
- Avg merge
- 28m
- Merged PRs (30d)
- 2
Description
I call crud.get via go-tarantool using the primary key in this way:
client.Do(crud.MakeGetRequest("users").Key([]any{reqUser.Token}), pool.ANY)
As a result, I look at the tnt_stats_op_total metric and see that one call and two selects are made on storage, which is strange. It seems that there should be one select, since this is a point query based on the primary key
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the crud.get entry point and the storage-side handling of MakeGetRequest("users").Key(...). Reproduce the request while watching tnt_stats_op_total, then trace why one call produces two selects; done means the primary-key request's select count matches the expected single lookup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100