Class BlockingReadRepair<E extends Endpoints<E>,P extends ReplicaPlan.ForRead<E,P>>
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,P>>
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
FieldsFields inherited from class org.apache.cassandra.service.reads.repair.AbstractReadRepair
cfs, command, replicaPlan, requestTime -
Method Summary
Modifier and TypeMethodDescriptionvoidBlock 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.ForWrite)getMergeListener(P replicaPlan) Used by DataResolver to generate corrections as the partition iterator is consumedvoidIf 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.voidrepairPartition(DecoratedKey partitionKey, Map<Replica, Mutation> mutations, ReplicaPlan.ForWrite writePlan) Repairs a partition _after_ receiving data responses.Methods inherited from class org.apache.cassandra.service.reads.repair.AbstractReadRepair
awaitReads, maybeSendAdditionalReads, replicaPlan, startRepair
-
Field Details
-
repairs
-
-
Method Details
-
getMergeListener
Description copied from interface:ReadRepairUsed by DataResolver to generate corrections as the partition iterator is consumed -
maybeSendAdditionalWrites
public void maybeSendAdditionalWrites()Description copied from interface:ReadRepairIf 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:ReadRepairBlock 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.ForWrite) -
repairPartition
public void repairPartition(DecoratedKey partitionKey, Map<Replica, Mutation> mutations, ReplicaPlan.ForWrite writePlan) Description copied from interface:ReadRepairRepairs a partition _after_ receiving data responses. This method receives replica list, since we will block repair only on the replicas that have responded.
-