Class ReadOnlyReadRepair<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.ReadOnlyReadRepair<E,P>
-
- All Implemented Interfaces:
ReadRepair<E,P>
public class ReadOnlyReadRepair<E extends Endpoints<E>,P extends ReplicaPlan.ForRead<E,P>> extends AbstractReadRepair<E,P>
Only performs the collection of data responses and reconciliation of them, doesn't send repair mutations to replicas. This preserves write atomicity, but doesn't provide monotonic quorum reads
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.cassandra.service.reads.repair.ReadRepair
ReadRepair.Factory
-
-
Field Summary
-
Fields inherited from class org.apache.cassandra.service.reads.repair.AbstractReadRepair
cfs, command, logger, replicaPlan, requestTime
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidawaitWrites()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.ForWrite)UnfilteredPartitionIterators.MergeListenergetMergeListener(P replicaPlan)Used by DataResolver to generate corrections as the partition iterator is consumedvoidmaybeSendAdditionalWrites()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.voidrepairPartition(DecoratedKey partitionKey, java.util.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
-
-
-
-
Method Detail
-
getMergeListener
public UnfilteredPartitionIterators.MergeListener getMergeListener(P replicaPlan)
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
-
repairPartition
public void repairPartition(DecoratedKey partitionKey, java.util.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.
-
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)
-
-