tsgrpc_kvstore driver - how to signal `generation_if_equal` mismatch on write?
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 28/100
Research direction
Start with the WriteRequest and WriteResponse proto comments and the linked PerformWriteback code in transaction.cc. Trace how generation_if_equal, an unknown generation, and GenerationAndTimestamp are handled, then document the expected mismatch response, retry behavior, and timestamp meaning; verify the explanation against the reported write sequence.
Written by the indexing model from the issue text.
Description
Hi,
I'm trying to implement a gRPC service for the tsgrpc_kvstore driver, and trying to understand how to correctly support the generation_if_equal option for WriteRequest. In particular, how to handle the case where the generation does not match - the comment in the proto says "the write is aborted" on a mismatch, what exactly does this mean?
Both returning an error from the RPC and returning an error in the WriteResponse.status field leads to the TensorStore write to fail immediately, which leads me to believe this is not what I should do?
Looking at PerformWriteback I see that the transaction is re-tried if the returned generation is "unknown" (== empty). However if I try this, TensorStore just sends writes with generation_if_equal=StorageGeneration::NoValue() in a loop, instead of what I would expect:
- Attempt a write with an old generation, receive StorageGeneration::Unknown
- Issue a read to obtain the current value of the file
- Issue a new write, with the update generation and value
thank you!
PS: I'm also a bit unclear what I should use for the timestamp value of GenerationAndTimestamp - is this intended to be the current time of the gRPC server? The last modified time of the file?
- Dominant language
- C++
- Stars
- 1.6k
- Forks
- 151
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
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.
More from google/tensorstore
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
google/tensorstore#305 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 64/100
google/tensorstore#298 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
google/tensorstore#291 · 1 comment · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
google/tensorstore#288 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
google/tensorstore#279 ·
All issues in google/tensorstore
Similar issues
-
documentation
Difficulty 1/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
grumpycoders/pcsx-redux#2667 ·
-
GCC 15.2: -Wcast-qual warning - cast discards const qualifier from pointer target type (H5trace.c)Open
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Maintainers usually reply within 1 day
-
bug module: copilot
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
MaaAssistantArknights/MaaAssistantArknights#19250 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
LadybirdBrowser/ladybird#14486 ·
Maintainers usually reply within 1 day