Class BlockingReadRepair<E extends Endpoints<E>,P extends ReplicaPlan.ForRead<E>>
- java.lang.Object
-
- org.apache.cassandra.service.reads.repair.AbstractReadRepair<E,P>
-
- org.apache.cassandra.service.reads.repair.BlockingReadRepair<E,P>
-
- All Implemented Interfaces:
ReadRepair<E,P>
public class BlockingReadRepair<E extends Endpoints<E>,P extends ReplicaPlan.ForRead<E>> extends AbstractReadRepair<E,P>
'Classic' read repair. Doesn't allow the client read to return until updates have been written to nodes needing correction. Breaks write atomicity in some situations
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.cassandra.service.reads.repair.ReadRepair
ReadRepair.Factory
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Queue<BlockingPartitionRepair>
repairs
-
Fields inherited from class org.apache.cassandra.service.reads.repair.AbstractReadRepair
cfs, command, queryStartNanoTime, replicaPlan
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
awaitWrites()
Block on any mutations (or timeout) we sent out to repair replicas inReadRepair.repairPartition(org.apache.cassandra.db.DecoratedKey, java.util.Map<org.apache.cassandra.locator.Replica, org.apache.cassandra.db.Mutation>, org.apache.cassandra.locator.ReplicaPlan.ForTokenWrite)
UnfilteredPartitionIterators.MergeListener
getMergeListener(P replicaPlan)
Used by DataResolver to generate corrections as the partition iterator is consumedvoid
maybeSendAdditionalWrites()
If it looks like we might not receive acks for all the repair mutations we sent out, combine all the unacked mutations and send them to the minority of nodes not involved in the read repair data read / write cycle.void
repairPartition(DecoratedKey partitionKey, java.util.Map<Replica,Mutation> mutations, ReplicaPlan.ForTokenWrite writePlan)
Repairs a partition _after_ receiving data responses.-
Methods inherited from class org.apache.cassandra.service.reads.repair.AbstractReadRepair
awaitReads, maybeSendAdditionalReads, replicaPlan, startRepair
-
-
-
-
Field Detail
-
repairs
protected final java.util.Queue<BlockingPartitionRepair> repairs
-
-
Method Detail
-
getMergeListener
public UnfilteredPartitionIterators.MergeListener getMergeListener(P replicaPlan)
Description copied from interface:ReadRepair
Used by DataResolver to generate corrections as the partition iterator is consumed
-
maybeSendAdditionalWrites
public void maybeSendAdditionalWrites()
Description copied from interface:ReadRepair
If it looks like we might not receive acks for all the repair mutations we sent out, combine all the unacked mutations and send them to the minority of nodes not involved in the read repair data read / write cycle. We will accept acks from them in lieu of acks from the initial mutations sent out, so long as we receive the same number of acks as repair mutations transmitted. This prevents misbehaving nodes from killing a quorum read, while continuing to guarantee monotonic quorum reads
-
awaitWrites
public void awaitWrites()
Description copied from interface:ReadRepair
Block on any mutations (or timeout) we sent out to repair replicas inReadRepair.repairPartition(org.apache.cassandra.db.DecoratedKey, java.util.Map<org.apache.cassandra.locator.Replica, org.apache.cassandra.db.Mutation>, org.apache.cassandra.locator.ReplicaPlan.ForTokenWrite)
-
repairPartition
public void repairPartition(DecoratedKey partitionKey, java.util.Map<Replica,Mutation> mutations, ReplicaPlan.ForTokenWrite writePlan)
Description copied from interface:ReadRepair
Repairs a partition _after_ receiving data responses. This method receives replica list, since we will block repair only on the replicas that have responded.
-
-