Skip to content

Recover transient initial object-store claims - #38

Open
igor-ladkin wants to merge 1 commit into
phoenixframework:mainfrom
igor-ladkin:igor-ladkin/fix-object-store-initial-claim
Open

igor-ladkin wants to merge 1 commit into
phoenixframework:mainfrom
igor-ladkin:igor-ladkin/fix-object-store-initial-claim

Conversation

@igor-ladkin

@igor-ladkin igor-ladkin commented Sep 23, 2026 •

Copy link
Copy Markdown

Initial object-store claims fail on a single dropped connection, including when the write committed but its response was lost. Retry transient claim failures twice, then reconcile ambiguous results only when stored bytes and the complete boot owner match the attempted claim.

@igor-ladkin
igor-ladkin force-pushed the igor-ladkin/fix-object-store-initial-claim branch from 85b79ad to 5c30d55 Compare September 23, 2026 10:35
%StoredState{meta: %Meta{} = attempted_meta},
encoded
) do
with {:ok, %{body: ^encoded, etag: etag}} <-

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we are pinning on ^encoded but shouldn't we be matching on our own etag instead?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@chrismccord TL;DR; It's the same check the put-path recovery already does, just shared now.

Initially the change was purely mechanical to reuse the same resolution logic we have in resolve_ambiguous_conditional_put for try_claim. I've checked the path again after you mentioned. I don't fully understand how we can match on etag. Ours only comes back on the 2xx of the PUT that committed, and that's exactly the response we lost (existing path). The retry just gets a 412. The one we do hold (the If-Match etag) is the version before our write, so it can't tell our write apart from someone else's. Claims don't even have that one. I mean, we could predict that etag would be some kind of hash but it doesn't feel right. Please correct if I'm missing anything significant 🙇‍♂️.

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