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

Allows for a default consistency to be set via the env #150

Merged
merged 1 commit into from
Mar 2, 2018

Conversation

zamith
Copy link
Contributor

@zamith zamith commented Mar 2, 2018

Why:

  • In some situations, particularly when testing, we'll want to have
    strong consistency, but that might not be true for the same operation
    in a different environment. So, it would be very helpful to be able to
    switch between types of consistency per environment.

This change addresses the need by:

  • Changing the default from being straight up :eventual but instead to
    search on the env first and only if nothing is found, then it will
    choose :eventual

PS: You'll notice that there are no tests for the router change. That is because it is set in a module attribute, which being a compile time evaluated property means I cannot affect from the spec. The only way I could think of testing it, would be to create a new environment just for that purpose, which might be an overkill. What do you think?

Why:

* In some situations, particularly when testing, we'll want to have
  strong consistency, but that might not be true for the same operation
  in a different environment. So, it would be very helpful to be able to
  switch between types of consistency per environment.

This change addresses the need by:

* Changing the default from being straight up `:eventual` but instead to
  search on the env first and only if nothing is found, then it will
  choose `:eventual`
@slashdotdash
Copy link
Member

@zamith Thanks for the pull request.

@slashdotdash slashdotdash merged commit cfbebe2 into commanded:master Mar 2, 2018
@zamith zamith deleted the zamith/default-concurrency branch March 2, 2018 11:23
slashdotdash added a commit that referenced this pull request Mar 5, 2018
Document new `default_consistency` config setting.
slashdotdash added a commit that referenced this pull request Mar 5, 2018
Document new `default_consistency` config setting.
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