Skip to content

Commit edf6034

Browse files
committed
Merge branch 'cassandra-4.1' into cassandra-5.0
2 parents da38230 + 5e26f25 commit edf6034

5 files changed

Lines changed: 11 additions & 5 deletions

File tree

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
5.0.9
2+
Merged from 4.0:
3+
* Backport CASSANDRA-17810 fix and improve RTBoundValidator error messages (CASSANDRA-18282)
24

35

46
5.0.8

src/java/org/apache/cassandra/db/ReadCommand.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -801,6 +801,7 @@ private UnfilteredPartitionIterator withQueryCancellation(UnfilteredPartitionIte
801801
/**
802802
* A transformation used for simulating slow queries by tests.
803803
*/
804+
@VisibleForTesting
804805
private static class DelayInjector extends Transformation<UnfilteredRowIterator>
805806
{
806807
@Override

src/java/org/apache/cassandra/db/ReadCommandVerbHandler.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
import java.util.concurrent.TimeUnit;
2121

22+
import com.google.common.base.Preconditions;
23+
2224
import org.slf4j.Logger;
2325
import org.slf4j.LoggerFactory;
2426

@@ -115,7 +117,7 @@ public void doVerb(Message<ReadCommand> message)
115117
{
116118
logger.debug("Query cancelled (timeout)", e);
117119
response = null;
118-
assert !command.isCompleted() : "Read marked as completed despite being aborted by timeout to table " + command.metadata();
120+
Preconditions.checkState(!command.isCompleted(), "Read marked as completed despite being aborted by timeout to table %s", command.metadata());
119121
}
120122

121123
if (command.complete())

src/java/org/apache/cassandra/db/transform/RTBoundValidator.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
import org.apache.cassandra.db.rows.UnfilteredRowIterator;
2626

2727
/**
28-
* A validating transformation that sanity-checks the sequence of RT bounds and boundaries in every partition.
28+
* A validating transformation that sanity-checks the sequence of Range Tombstone bounds and boundaries in every
29+
* partition.
2930
*
3031
* What we validate, specifically:
3132
* - that open markers are only followed by close markers
@@ -109,7 +110,7 @@ public RangeTombstoneMarker applyToMarker(RangeTombstoneMarker marker)
109110
public void onPartitionClose()
110111
{
111112
if (enforceIsClosed && null != openMarkerDeletionTime)
112-
throw ise("expected all RTs to be closed, but the last one is open");
113+
throw ise("expected all Range Tombstones to be closed, but the last one is open");
113114
}
114115

115116
private IllegalStateException ise(String why)
@@ -119,7 +120,7 @@ private IllegalStateException ise(String why)
119120

120121
private String message(String why)
121122
{
122-
return String.format("%s UnfilteredRowIterator for %s (key: %s omdt: [%s]) has an illegal RT bounds sequence: %s",
123+
return String.format("%s UnfilteredRowIterator for %s (key: %s omdt: [%s]) has an illegal Range Tombstone bounds sequence: %s",
123124
stage,
124125
partition.metadata(),
125126
partition.metadata().partitionKeyType.getString(partition.partitionKey().getKey()),

src/java/org/apache/cassandra/service/StorageProxy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2222,7 +2222,7 @@ protected void runMayThrow()
22222222
{
22232223
logger.debug("Query cancelled (timeout)", e);
22242224
response = null;
2225-
assert !command.isCompleted() : "Local read marked as completed despite being aborted by timeout to table " + command.metadata();
2225+
Preconditions.checkState(!command.isCompleted(), "Local read marked as completed despite being aborted by timeout to table %s", command.metadata());
22262226
}
22272227

22282228
if (command.complete())

0 commit comments

Comments
 (0)