8000 fix two rare bugs observed in Etcd response handling by jgraettinger · Pull Request #435 · gazette/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix two rare bugs observed in Etcd response handling #435

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 18, 2025

Conversation

jgraettinger
Copy link
Contributor
@jgraettinger jgraettinger commented Jun 17, 2025

This change is Reviewable

jgraettinger and others added 2 commits June 17, 2025 13:34
* Shard Apply API incorrectly didn't return immediately on err != nil
* Use GetRevision instead of direct Revision access. This should not be
  required given Etcd semantics, but we don't control Etcd.
The Announce() function could get permanently wedged if a key creation
succeeded but returned an error (e.g., network issue). On retry, it
would see its own key and retry forever.

This fix uses a single transaction that either creates the key or
retrieves the existing one. If the existing key has our lease ID,
we return success since we created it in a previous attempt.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@jgraettinger jgraettinger requested a review from psFried June 17, 2025 19:01
Copy link
Contributor
@psFried psFried left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jgraettinger jgraettinger merged commit 5d40ab8 into master Jun 18, 2025
1 check passed
@jgraettinger jgraettinger deleted the johnny/fixes branch June 18, 2025 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0