Fix HLC monotonicity, SigV4 sig comparison, and coordinator redirect timestamp safety#399
Merged
bootjp merged 2 commits intofeature/s3-implfrom Mar 22, 2026
Merged
Fix HLC monotonicity, SigV4 sig comparison, and coordinator redirect timestamp safety#399bootjp merged 2 commits intofeature/s3-implfrom
bootjp merged 2 commits intofeature/s3-implfrom
Conversation
Merged
…dinator redirect Co-authored-by: bootjp <1306365+bootjp@users.noreply.github.com> Agent-Logs-Url: https://github.com/bootjp/elastickv/sessions/26a0122b-27bb-4ba7-8596-ae3af70b98dd
Copilot
AI
changed the title
[WIP] Add S3 adapter for elastickv
Fix HLC monotonicity, SigV4 sig comparison, and coordinator redirect timestamp safety
Mar 22, 2026
bootjp
approved these changes
Mar 22, 2026
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.
Four correctness issues flagged in code review on the S3 adapter + coordinator changes.
HLC monotonicity with caller-provided
CommitTSWhen a non-zero
CommitTSis passed by the caller,ShardedCoordinator.dispatchTxnandtxnLogsused it directly without observing it on the HLC. Subsequentclock.Next()calls could then issue timestamps smaller than a previously committedCommitTS, breaking MVCC ordering.Applied in both
dispatchTxnandtxnLogs.SigV4 authorization: compare signature only
Full Authorization header string comparison was brittle — semantically equivalent headers differing in whitespace or parameter ordering would fail. Now extracts and compares just the
Signature=<hex>component via a newextractS3Signaturehelper (with table-driven unit tests).Coordinator redirect: clear
CommitTSwhenStartTSis absentIn the follower redirect path, a caller-supplied
CommitTSwithStartTS=0was forwarded as-is. The leader stamps a freshStartTSindependently but won't override an existingCommitTSin the txn meta, producingCommitTS ≤ StartTS. Fix: zero outCommitTSwhenStartTSis unset so the leader assigns both consistently.⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.