-
Notifications
You must be signed in to change notification settings - Fork 0
fix(load): retry append loads instead of running them at most once #75
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
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: (not blocking)
CONFLICT→ terminal is applied byclassify_sdk_errorto every endpoint, but the reasoning below it is load-specific ("an upload already consumed…, a receipt naming a different target, an incompatible column type").The case I'd want checked before merging is
ManagedDatabaseClient.ensure_managed_database(managed_client.py:92-104): the operation resolves, and onKeyErrorcreates. If two writers race and the loser's create is answered409 CONFLICT(duplicate description / already exists), the old behaviour retried, the retry'sresolve_managed_databasefound the database the winner had just made, andensure_managed_databasereturned normally. WithCONFLICTterminal that race now surfaces as a hard failure.If the API only ever emits
CONFLICTfrom the load path, this is a non-issue — but the classifier can't tell, so it's worth confirming which endpoints use that code.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked this, and I don't think the race is reachable — but it was the right thing to ask, and the objection to how the rule is written stands regardless.
On the specific case: a managed database's description is not unique. Two concurrent
create_managed_databasecalls with the same description both succeed and yield two databases; neither is answeredCONFLICT. So in theensure_managed_databasesequence the loser's create doesn't 409, and there is no self-healing retry to lose.The
CONFLICTs reachable near that path are an alias/effective-name collision when attaching a catalog to a database that already has one under that name, and a guard against bulk-deleting a batch whose databases hold data. Neither is reachable from creating a fresh database.Both of those are also genuinely terminal — retrying either reaches the same answer — so terminal is the right classification for them too, which is the general property the rule needs rather than a load-specific one.
You're right that the reasoning under the branch is written load-specifically while the rule is global. The examples are load examples because that's the path this PR is about; the rule itself only claims "the request cannot succeed as posted", which is what
CONFLICTmeans everywhere it's emitted. If a future endpoint starts usingCONFLICTfor something retryable, this classifier is where it'd bite, and the comment should be the thing that warns them. Happy to reword it that way if you'd rather it not read as load-only.