mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-4.0' into cassandra-4.1
This commit is contained in:
commit
4f4c5542fe
|
|
@ -5,6 +5,7 @@
|
|||
* Equality check for Paxos.Electorate should not depend on collection types (CASSANDRA-19935)
|
||||
* Fix race condition in DecayingEstimatedHistogramReservoir during rescale (CASSANDRA-19365)
|
||||
Merged from 4.0:
|
||||
* Do not attach rows and partitions to CheckForAbort when already attached (CASSANDRA-20135)
|
||||
* Allow hint delivery during schema mismatch (CASSANDRA-20188)
|
||||
* IndexOutOfBoundsException when accessing partition where the column was deleted (CASSANDRA-20108)
|
||||
* Enhance CQLSSTableWriter to notify clients on sstable production (CASSANDRA-19800)
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@ import org.slf4j.LoggerFactory;
|
|||
import io.netty.util.concurrent.FastThreadLocal;
|
||||
import org.apache.cassandra.config.*;
|
||||
import org.apache.cassandra.db.filter.*;
|
||||
import org.apache.cassandra.db.transform.BasePartitions;
|
||||
import org.apache.cassandra.db.transform.BaseRows;
|
||||
import org.apache.cassandra.net.MessageFlag;
|
||||
import org.apache.cassandra.net.ParamType;
|
||||
import org.apache.cassandra.net.Verb;
|
||||
|
|
@ -616,6 +618,22 @@ public abstract class ReadCommand extends AbstractReadQuery
|
|||
{
|
||||
long lastChecked = 0;
|
||||
|
||||
@Override
|
||||
protected void attachTo(BasePartitions partitions)
|
||||
{
|
||||
Preconditions.checkArgument(this.partitions == null || this.partitions == partitions,
|
||||
"Attempted to attach 2nd different BasePartitions in StoppingTransformation; this is a bug.");
|
||||
this.partitions = partitions;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void attachTo(BaseRows rows)
|
||||
{
|
||||
Preconditions.checkArgument(this.rows == null || this.rows == rows,
|
||||
"Attempted to attach 2nd different BaseRows in StoppingTransformation; this is a bug.");
|
||||
this.rows = rows;
|
||||
}
|
||||
|
||||
protected UnfilteredRowIterator applyToPartition(UnfilteredRowIterator partition)
|
||||
{
|
||||
if (maybeAbort())
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@ import org.apache.cassandra.db.rows.BaseRowIterator;
|
|||
// A Transformation that can stop an iterator earlier than its natural exhaustion
|
||||
public abstract class StoppingTransformation<I extends BaseRowIterator<?>> extends Transformation<I>
|
||||
{
|
||||
private BaseIterator rows;
|
||||
private BaseIterator partitions;
|
||||
protected BaseIterator rows;
|
||||
protected BaseIterator partitions;
|
||||
|
||||
/**
|
||||
* If invoked by a subclass, any partitions iterator this transformation has been applied to will terminate
|
||||
|
|
|
|||
Loading…
Reference in New Issue