mirror of https://github.com/apache/cassandra
Fix availability validation for LOCAL_ONE CL
patch by Aleksey Yeschenko; reviewed by Sylvain Lebresne for CASSANDRA-7319
This commit is contained in:
parent
7bbeb5aa2d
commit
ea26dbd730
|
|
@ -25,6 +25,7 @@
|
|||
* reduce garbage creation in calculatePendingRanges (CASSANDRA-7191)
|
||||
* exit CQLSH with error status code if script fails (CASSANDRA-6344)
|
||||
* Fix bug with some IN queries missig results (CASSANDRA-7105)
|
||||
* Fix availability validation for LOCAL_ONE CL (CASSANDRA-7319)
|
||||
|
||||
|
||||
1.2.16
|
||||
|
|
|
|||
|
|
@ -249,6 +249,10 @@ public enum ConsistencyLevel
|
|||
case ANY:
|
||||
// local hint is acceptable, and local node is always live
|
||||
break;
|
||||
case LOCAL_ONE:
|
||||
if (countLocalEndpoints(liveEndpoints) == 0)
|
||||
throw new UnavailableException(this, 1, 0);
|
||||
break;
|
||||
case LOCAL_QUORUM:
|
||||
int localLive = countLocalEndpoints(liveEndpoints);
|
||||
if (localLive < blockFor)
|
||||
|
|
|
|||
Loading…
Reference in New Issue