Add ttl for raw client#324
Merged
Merged
Conversation
|
This is the feature I need |
ekexium
reviewed
Dec 8, 2021
ekexium
left a comment
Collaborator
There was a problem hiding this comment.
Need some doc comments. Others LGTM.
|
I really really need this feature!! Is there a reason why this PR was not merged / worked upon anymore? |
Collaborator
Author
|
Oh, it was just forgotten. |
Signed-off-by: Andy Lok <andylokandy@hotmail.com>
iosmanthus
approved these changes
Dec 28, 2023
pingyu
pushed a commit
to pingyu/client-rust
that referenced
this pull request
Jan 25, 2026
* Add ttl for raw client Signed-off-by: Andy Lok <andylokandy@hotmail.com> * fmt Signed-off-by: Andy Lok <andylokandy@hotmail.com> --------- Signed-off-by: Andy Lok <andylokandy@hotmail.com> Signed-off-by: Ping Yu <yuping@pingcap.com>
eduralph
added a commit
to getwyrd/client-rust
that referenced
this pull request
Jul 15, 2026
…revision The vendored protos were an unrecorded late-2023/early-2024 vintage (errorpb and pdpb untouched since tikv#324, one hand-patched addition from tikv#519). Re-vendor everything at pingcap/kvproto b41e86365ce0 — the revision client-go currently pins — and add proto/VERSION so the vintage is never again guesswork. Regenerated with the existing tonic-build pipeline (21 files). One mechanical source fix: pdpb.RequestHeader gained caller_component/caller_id. Two new protocol semantics arrive with the refresh and are handled rather than silently mis-parsed: 1. errorpb.UndeterminedResult (an unknown raft apply outcome). The transport never retries it in client-go (region_request.go: 'should not retry ... processed by the caller'); each action decides. Here: the plan layer retries by default (replaying an idempotent request resolves the uncertainty, and the error escapes UNCHANGED on backoff exhaustion), while plans for which a replay is unsafe are terminal on first sight — raw CAS (a replay would compare against its own effect and report a false failure), the primary commit (client-go returns ErrResultUndetermined there, commit.go), and async-commit/1PC prewrites (the commit point; stricter than client-go, in the safe direction). Commit paths classify the surfaced error as UndeterminedError: at a commit point, 'failed' must never be claimed when the transaction may already be durable. 2. Shared locks (SharedLock / SharedPessimisticLock, whose real holders live in shared_lock_infos — 'DO NOT read from the wrapper LockInfo'). This client does not implement shared-lock resolution yet, and partial handling is worse than none (resolving the wrapper checks transaction 0; filtering on wrapper fields silently drops members). Resolution therefore REFUSES them with an explicit error, before any filter. The API-v2 keyspace codecs are wrapper-aware (identifying wrappers by TYPE — the empty logical key is valid — and recursing into members), so scan results can never panic the truncation path. Tests: 67 lib tests (4 new: undetermined terminal/preserved/recognized, shared-lock refusal); txn/raw/failpoint integration suites green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Eduard R. <eduard@ralphovi.net>
eduralph
added a commit
to getwyrd/client-rust
that referenced
this pull request
Jul 15, 2026
…revision The vendored protos were an unrecorded late-2023/early-2024 vintage (errorpb and pdpb untouched since tikv#324, one hand-patched addition from tikv#519). Re-vendor everything at pingcap/kvproto b41e86365ce0 — the revision client-go currently pins — and add proto/VERSION so the vintage is never again guesswork. Regenerated with the existing tonic-build pipeline (21 files). One mechanical source fix: pdpb.RequestHeader gained caller_component/caller_id. Two new protocol semantics arrive with the refresh and are handled rather than silently mis-parsed: 1. errorpb.UndeterminedResult (an unknown raft apply outcome). The transport never retries it in client-go (region_request.go: 'should not retry ... processed by the caller'); each action decides. Here: the plan layer retries by default (replaying an idempotent request resolves the uncertainty, and the error escapes UNCHANGED on backoff exhaustion), while plans for which a replay is unsafe are terminal on first sight — raw CAS (a replay would compare against its own effect and report a false failure), the primary commit (client-go returns ErrResultUndetermined there, commit.go), and async-commit/1PC prewrites (the commit point; stricter than client-go, in the safe direction). Commit paths classify the surfaced error as UndeterminedError: at a commit point, 'failed' must never be claimed when the transaction may already be durable. 2. Shared locks (SharedLock / SharedPessimisticLock, whose real holders live in shared_lock_infos — 'DO NOT read from the wrapper LockInfo'). This client does not implement shared-lock resolution yet, and partial handling is worse than none (resolving the wrapper checks transaction 0; filtering on wrapper fields silently drops members). Resolution therefore REFUSES them with an explicit error, before any filter. The API-v2 keyspace codecs are wrapper-aware (identifying wrappers by TYPE — the empty logical key is valid — and recursing into members), so scan results can never panic the truncation path. Tests: 67 lib tests (4 new: undetermined terminal/preserved/recognized, shared-lock refusal); txn/raw/failpoint integration suites green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Eduard R. <eduard@ralphovi.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: andylokandy andylokandy@hotmail.com
closes ##370