Created
October 15, 2015 09:48
-
-
Save undeadcat/39e92e08bbb12dab3e00 to your computer and use it in GitHub Desktop.
Cassandra code. Mutate all the things!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public List<InetAddress> filterForQuery(Keyspace keyspace, List<InetAddress> liveEndpoints, ReadRepairDecision readRepair) | |
{ | |
/* | |
* Endpoints are expected to be restricted to live replicas, sorted by snitch preference. | |
* For LOCAL_QUORUM, move local-DC replicas in front first as we need them there whether | |
* we do read repair (since the first replica gets the data read) or not (since we'll take | |
* the blockFor first ones). | |
*/ | |
if (isDCLocal) | |
Collections.sort(liveEndpoints, DatabaseDescriptor.getLocalComparator()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment