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

Retry with same event id on write timeout #1357

Merged
merged 1 commit into from Jul 13, 2017

Conversation

2 participants
@pgermishuys
Member

pgermishuys commented Jul 12, 2017

When a projection attempts to write it's persisted state, when retrying this needs to be done with the same event id so that the write is handled in an idempotent manner by Event Store.

Retry with same event id on write timeout
When a projection attempts to write it's persisted state, when retrying this
needs to be done with the same event id so that the write is handled in
an idempotent manner by Event Store.
@hayley-jean

Tested this by forcing an idempotent write on the projection definition stream when starting and stopping the projection.

On 4.0.2, the projection retries the write and then fails when the write succeeds. Any further attempts to start or stop the projection is met with "Projection version and event number mismatch" and attempting to reset the projection results in "Internal error: projection definition must be saved before forced updating version."

With this PR, the projection retries the write, Event Store logs an Idempotent write and the projection continues without any issues.

@hayley-jean hayley-jean merged commit 3bc6b05 into release-v4.0.2 Jul 13, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
wercker/build-mono4 Wercker pipeline passed
Details

@hayley-jean hayley-jean deleted the projections_persisted_state_write_timeout branch Jul 13, 2017

hayley-jean added a commit that referenced this pull request Jul 31, 2017

Merge pull request #1357 from EventStore/projections_persisted_state_…
…write_timeout

Retry with same event id on write timeout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment