-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add replication strategy support (#1) #9
Conversation
* Basic setup for replication configuration support for Pillar. * Removed ReplicationOptions as it was redundant. * Error handling for reading ReplicationStrategy from our config. * Tweaked the error handling. * Modified the CommandExecutorTest and added a new test. * Add qualifications for config params. * added cassandra unit and tweaked app default params * Improved README
Credit for the initial work goes to @j-potts |
@@ -4,5 +4,3 @@ jdk: | |||
- oraclejdk8 | |||
scala: | |||
- 2.11.8 | |||
services: |
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.
not required now we're using cassandra-unit
import org.scalatest.{BeforeAndAfter, FeatureSpec, GivenWhenThen, Matchers} | ||
|
||
class PillarCommandLineAcceptanceSpec extends FeatureSpec | ||
with CassandraSpec |
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.
This gives us an embedded cassandra
@lichtsprung we also have another pr almost ready to go which build on this one, adding quorum consistency for the migrations. This is essential when running against several nodes. |
@markglh Awesome! I will try to review both PRs this Friday :) |
@lichtsprung that's great, thanks! We'll raise the second PR later today then so it's ready for you. It builds upon this one so probably best to review + merge this one before reviewing the second |
* Set default consistency level to QUORUM
I've merged the consistency level changes into this pr as they kind of go hand in hand and are fairly trivial. |
@markglh I agree with that you don't want to use a lower consistency level than QUORUM but what if you need LOCAL_QUORUM consistency? |
If it's a single DC then we'd effectively have Are you thinking we may want |
To elaborate on the multiple DC thing, my thinking was that having inconsistent keyspaces across DC's could potentially be a major issue if applications start running before they're consistent |
@markglh Not sure. Was just wondering if there might be a (good) reason for using some variant of I think I'd prefer |
...Not sure if this is really an issue or necessary for a multiple DCs. @markglh We can merge this version and see if anyone complains that they need some higher consistency level for whatever reason. |
@lichtsprung works for me. If feedback is that we want this configurable we can make the change. Would you like it changing to EACH_QUORUM before the merge? |
@markglh Let me ask our ops team. If they prefer something other than quorum, we need to make it configurable. |
@markglh I'll publish a new version on Monday. |
@lichtsprung that's great, thanks!! |
Simple Strategy
Network Topology Strategy
https://github.com/jsevellec/cassandra-unit
consistencyLevel
toQUORUM
. This ensures that the migrations are immediately consistent (both read and write will useQUORUM
). High consistency here is essential to ensure that we always read the latest migrations and don't try to re-apply. Additionally, performance is not a concern as this are executed as a one-off.We deliberately didn't make the consistency level configurable as we don't believe it adds value, there isn't a valid reason to use a lower consistency level than
QUORUM
here.