tarantool / tarantool/crud

It seems that crud is doing two selects in one `crud.get`

Open
#413 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

performance
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.