Repository navigation
fix(gatewayidentity): serialize marker transitions - #861
Conversation
50eaccc to
5cf9051
Compare
|
Rebased onto current
Marking this ready and waiting for the fresh GitHub checks before squash merge. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5cf90513e8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if !s.transactionLockHeld { | ||
| if err := lockLinuxBindingDirectory(s.dir); err != nil { | ||
| return fmt.Errorf("lock binding directory for transition: %w", err) |
There was a problem hiding this comment.
Add a changeset for the binding reliability fix
This changes user-visible adoption behavior by preventing concurrent marker transitions from failing, but the commit adds no .changeset/*.md entry. Consequently, the changeset gate will reject the change unless manually overridden, and the fix will not independently drive versioning or release notes; add a changeset describing the gateway-identity reliability correction.
AGENTS.md reference: AGENTS.md:L109-L114
Useful? React with 👍 / 👎.
What changed
ReplaceExactwhen the caller does not already hold the binding transaction lockCloseWhy
Concurrent stores could all read
pending, then replace the marker with separate inodes containing the sameactivebytes. A losing read could see those valid inode changes for all retry attempts and returnbinding file state changed before return.The lock lets one store finish the marker change. The other stores then read the same active bytes and return success. File, directory, owner, link and content checks remain unchanged.
Impact
The public binding entry points already hold the directory lock across the full binding transaction, so their lock scope does not change. Direct storage transitions now follow the same ordering and the Linux CI test no longer depends on timing.
Checks
-count=500-count=50gatewayidentitypackagemake verifymake verify-allFixes #833