Merge branch 'cassandra-5.0' into trunk

This commit is contained in:
Stefan Miklosovic 2026-04-17 11:00:23 +02:00
commit 001accf8d2
No known key found for this signature in database
GPG Key ID: 32F35CB2F546D93E
5 changed files with 11 additions and 5 deletions

View File

@ -14,6 +14,7 @@ Merged from 5.0:
Merged from 4.1:
* Harden data resurrection startup check with atomic heartbeat file write with fallback (CASSANDRA-21290)
Merged from 4.0:
* Backport CASSANDRA-17810 fix and improve RTBoundValidator error messages (CASSANDRA-18282)
* Rate limit password changes (CASSANDRA-21202)

View File

@ -894,6 +894,7 @@ public abstract class ReadCommand extends AbstractReadQuery
/**
* A transformation used for simulating slow queries by tests.
*/
@VisibleForTesting
private static class DelayInjector extends Transformation<UnfilteredRowIterator>
{
@Override

View File

@ -17,6 +17,8 @@
*/
package org.apache.cassandra.db;
import com.google.common.base.Preconditions;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -116,7 +118,7 @@ public class ReadCommandVerbHandler implements IVerbHandler<ReadCommand>
{
logger.debug("Query cancelled (timeout)", e);
response = null;
assert !command.isCompleted() : "Read marked as completed despite being aborted by timeout to table " + command.metadata();
Preconditions.checkState(!command.isCompleted(), "Read marked as completed despite being aborted by timeout to table %s", command.metadata());
}
if (command.complete())

View File

@ -25,7 +25,8 @@ import org.apache.cassandra.db.rows.RangeTombstoneMarker;
import org.apache.cassandra.db.rows.UnfilteredRowIterator;
/**
* A validating transformation that sanity-checks the sequence of RT bounds and boundaries in every partition.
* A validating transformation that sanity-checks the sequence of Range Tombstone bounds and boundaries in every
* partition.
*
* What we validate, specifically:
* - that open markers are only followed by close markers
@ -109,7 +110,7 @@ public final class RTBoundValidator extends Transformation<UnfilteredRowIterator
public void onPartitionClose()
{
if (enforceIsClosed && null != openMarkerDeletionTime)
throw ise("expected all RTs to be closed, but the last one is open");
throw ise("expected all Range Tombstones to be closed, but the last one is open");
}
private IllegalStateException ise(String why)
@ -119,7 +120,7 @@ public final class RTBoundValidator extends Transformation<UnfilteredRowIterator
private String message(String why)
{
return String.format("%s UnfilteredRowIterator for %s (key: %s omdt: [%s]) has an illegal RT bounds sequence: %s",
return String.format("%s UnfilteredRowIterator for %s (key: %s omdt: [%s]) has an illegal Range Tombstone bounds sequence: %s",
stage,
partition.metadata(),
partition.metadata().partitionKeyType.getString(partition.partitionKey().getKey()),

View File

@ -45,6 +45,7 @@ import java.util.stream.Collectors;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import com.google.common.base.Preconditions;
import com.google.common.cache.CacheLoader;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
@ -2761,7 +2762,7 @@ public class StorageProxy implements StorageProxyMBean
{
logger.debug("Query cancelled (timeout)", e);
response = null;
assert !command.isCompleted() : "Local read marked as completed despite being aborted by timeout to table " + command.metadata();
Preconditions.checkState(!command.isCompleted(), "Local read marked as completed despite being aborted by timeout to table %s", command.metadata());
}
if (command.complete())