Skip to content
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 command execution on concurrency error #132

Merged
merged 1 commit into from Jan 31, 2018

Conversation

slashdotdash
Copy link
Member

Retry executing a command if appending events to the aggregate's stream fails with an {:error, :wrong_expected_version} concurrency error. The missing event(s) are fetched from the event store to update the aggregate state and attempt the command again.

Aggregate instances are singletons when run on a single node, or cluster if using the distributed registry, so should not fail with this error. However, the change allows Commanded to work when run on multiple nodes that are not connected to form a cluster.

Retry executing a command if appending events to the aggregate's stream fails with an `{:error, :wrong_expected_version}` concurrency error. The missing event(s) are fetched from the event store to update the aggregate state and attempt the command again.

Aggregate instances are singletons on a single node, and cluster if using the distributed registry. However, this allows Commanded to still work when run on multiple nodes that are not connected to form a cluster.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant