-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
In Cassandra3 storage, only use consistency level LOCAL_ONE if a local_dc has been defined, otherwise use ONE #1753
Conversation
…l_dc has been defined, otherwise use ONE. Mark all writes as idempotent. Update the retry policy, honouring idempotence, consistency level, and applying appropriate back-pressure.
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.
reformatted w/ https://github.com/square/java-code-styles vs nagging you :)
just one thing on my end, just to understand this. @llinder how do you feel?
@@ -123,6 +125,13 @@ static Cluster buildCluster(Cassandra3Storage cassandra) { | |||
builder.withPoolingOptions(new PoolingOptions().setMaxConnectionsPerHost( | |||
HostDistance.LOCAL, cassandra.maxConnections | |||
)); | |||
|
|||
builder.withQueryOptions( |
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 is the only one I don't know just by reading it. Can you put a comment line of why we do this, or tell me and I'll add it? Thx!
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.
if local_dc
isn't defined then LOCAL_ONE sticks requests to the dc of the first seed host that the driver connects to.
ONE will at least in this situation connect to any dc, and then any latency awareness will bring it back to (eventually) using the local dc.
furthermore LOCAL_ONE
can fail easily if you're not using 'NetworkTopologyStrategy` but that's a fix for another day.
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.
added comment. (can you please squash the 4 commits!)
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.
great info. ty
thanks tons!
|
…l_dc has been defined, otherwise use ONE (openzipkin#1753) Mark all writes as idempotent. Update the retry policy, honouring idempotence, consistency level, and applying appropriate back-pressure.
…l_dc has been defined, otherwise use ONE (openzipkin#1753) Mark all writes as idempotent. Update the retry policy, honouring idempotence, consistency level, and applying appropriate back-pressure.
Also…