Class ReadOnlyReadRepair<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.ReadOnlyReadRepair<E,P>
-
- All Implemented Interfaces:
ReadRepair<E,P>
public class ReadOnlyReadRepair<E extends Endpoints<E>,P extends ReplicaPlan.ForRead<E>> 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, 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
-
-
-
-
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
-
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.
-
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)
-
-