Skip to content

Retry on failed crud uploads#16

Merged
simolus3 merged 2 commits into
mainfrom
fix-crud-upload-retries
Jul 22, 2026
Merged

Retry on failed crud uploads#16
simolus3 merged 2 commits into
mainfrom
fix-crud-upload-retries

Conversation

@simolus3

@simolus3 simolus3 commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

The state machine in upload actors to recover from upload errors was broken (the transition after WaitingForReconnect goes to Connected which is an idle state, it should transition to start_upload() instead).

But we don't really need a separate error state in the state machine at all, we can instead use a single async function to retry uploads in a loop until there are no more remaining entries or the upload is cancelled. This PR removes the WaitingForReconnect state and migrates most of the upload logic from an explicit state machine invocation into CrudUpload::run.

AI use: Changes manual, reviewed with Claude Code.

Closes #15.

@simolus3
simolus3 marked this pull request as ready for review July 22, 2026 09:29
@simolus3
simolus3 requested a review from rkistner July 22, 2026 09:30

@rkistner rkistner left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I did not check all the changes in detail, but the description makes sense, and this appears to align with how we handle this in other SDKs.

@simolus3
simolus3 merged commit 404321a into main Jul 22, 2026
5 checks passed
@simolus3
simolus3 deleted the fix-crud-upload-retries branch July 22, 2026 10:05
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.

A failed CRUD upload round is never retried — the backlog stalls until the next local write

2 participants