Fix HLC monotonicity, nil guards, and config parsing in S3 adapter#402
Merged
bootjp merged 2 commits intofeature/s3-implfrom Mar 22, 2026
Merged
Fix HLC monotonicity, nil guards, and config parsing in S3 adapter#402bootjp merged 2 commits intofeature/s3-implfrom
bootjp merged 2 commits intofeature/s3-implfrom
Conversation
Merged
…rsing hardening Co-authored-by: bootjp <1306365+bootjp@users.noreply.github.com> Agent-Logs-Url: https://github.com/bootjp/elastickv/sessions/82513c62-6b3f-4606-9c2f-4f1fbaa470ad
Copilot
AI
changed the title
[WIP] Add S3 adapter to elastickv
Fix HLC monotonicity, nil guards, and config parsing in S3 adapter
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 and safety issues flagged in review on the S3 adapter PR.
Changes
kv/coordinator.go–dispatchTxnwas not observing a caller-providedcommitTSon the HLC, allowing subsequentclock.Next()calls to return timestamps smaller than a usedcommitTS. Addedc.clock.Observe(commitTS)in the non-zero branch.adapter/s3.go–S3Server.Run()would panic ifhttpServerorlistenwere nil (possible when server is constructed without a listener). Added early nil-return errors for both fields.cmd/server/demo.go(coordinator nil check) –setupS3accepted*kv.Coordinateand stored it into interfaces without a nil check. A nil pointer stored in an interface is non-nil and panics on method call. Added an explicitcoordinator != nilguard.cmd/server/demo.go(raftS3MapStr parsing) – Usedstrings.Split(part, "=")which silently drops malformed entries and breaks on values containing=. Replaced withstrings.SplitN(strings.TrimSpace(part), "=", 2)and returns an error for any entry not matchingaddr=s3addr.📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.