Change trunk from 5.1 to 6.0

patch by Mick Semb Wever; reviewed by Dmitry Konstantinov for CASSANDRA-21243
This commit is contained in:
mck 2026-03-21 12:14:38 +01:00
parent 5c07c122be
commit 6590cb5aaf
No known key found for this signature in database
GPG Key ID: E91335D77E3E87CB
43 changed files with 127 additions and 127 deletions

View File

@ -1,4 +1,4 @@
5.1
6.0
* Improve performance when calculating settled placements during range movements (CASSANDRA-21144)
* Make shadow gossip round parameters configurable for testing (CASSANDRA-21149)
* Avoid potential gossip thread deadlock during decommission (CASSANDRA-21143)

View File

@ -75,7 +75,7 @@ restore snapshots created with the previous major version using the
using the provided 'sstableupgrade' tool.
5.1
6.0
===
New features

View File

@ -52,7 +52,7 @@ be sitting in front of a prompt:
----
Connected to Test Cluster at localhost:9160.
[cqlsh 6.3.0 | Cassandra 5.0-SNAPSHOT | CQL spec 3.4.8 | Native protocol v5]
[cqlsh 6.3.0 | Cassandra 6.0-SNAPSHOT | CQL spec 3.4.8 | Native protocol v5]
Use HELP for help.
cqlsh>
----

View File

@ -33,7 +33,7 @@
<property name="debuglevel" value="source,lines,vars"/>
<!-- default version and SCM information -->
<property name="base.version" value="5.1"/>
<property name="base.version" value="6.0"/>
<property name="scm.connection" value="scm:https://gitbox.apache.org/repos/asf/cassandra.git"/>
<property name="scm.developerConnection" value="scm:https://gitbox.apache.org/repos/asf/cassandra.git"/>
<property name="scm.url" value="https://gitbox.apache.org/repos/asf?p=cassandra.git"/>

View File

@ -1481,7 +1481,7 @@ slow_query_log_timeout: 500ms
# most users should never need to adjust this.
# phi_convict_threshold: 8
# IEndpointSnitch has been deprecated in Cassandra 5.1
# IEndpointSnitch has been deprecated in Cassandra 6.0
# Configuring a cluster with an IEndpointSnitch implementation using the endpoint_snitch setting remains supported,
# but is superceded by the new settings detailed below.
# endpoint_snitch -- Set this to a class that implements

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
cassandra (5.1) UNRELEASED; urgency=medium
cassandra (6.0) UNRELEASED; urgency=medium
* New release

View File

@ -438,7 +438,7 @@ Thread pool information includes active tasks, active tasks limit,
blocked tasks, blocked tasks all time, completed tasks, and pending
tasks. A query on the `thread_pools` returns following details:
From 5.1 (CASSANDRA-19289), this table also displays core pool size, max pool size and max queued tasks values (visible
From 6.0 (CASSANDRA-19289), this table also displays core pool size, max pool size and max queued tasks values (visible
from `nodetool tpstats --verbose` as well.)
[source, console]

View File

@ -1,9 +1,9 @@
= New Features
:navtitle: What's new
== New Features in Apache Cassandra 5.1
== New Features in Apache Cassandra 6.0
This section covers the new features in Apache Cassandra 5.1.
This section covers the new features in Apache Cassandra 6.0.
* https://cwiki.apache.org/confluence/x/FQRACw[ACID Transactions (Accord)]
* https://cwiki.apache.org/confluence/x/YyD1D[Transactional Cluster Metadata]

File diff suppressed because one or more lines are too long

View File

@ -187,9 +187,9 @@ public class Config
public volatile DurationSpec.LongMillisecondsBound cms_await_timeout = new DurationSpec.LongMillisecondsBound("120000ms");
public volatile int cms_default_max_retries = 10;
@Deprecated(since="5.1")
@Deprecated(since="6.0")
public volatile DurationSpec.IntMillisecondsBound cms_default_retry_backoff = null;
@Deprecated(since="5.1")
@Deprecated(since="6.0")
public volatile DurationSpec.IntMillisecondsBound cms_default_max_retry_backoff = null;
public String cms_retry_delay = "50ms*attempts <= 500ms ... 100ms*attempts <= 1s,retries=10";

View File

@ -63,7 +63,7 @@ import org.apache.cassandra.utils.btree.BTreeSet;
import static java.util.concurrent.TimeUnit.NANOSECONDS;
import static org.apache.cassandra.net.MessagingService.VERSION_40;
import static org.apache.cassandra.net.MessagingService.VERSION_50;
import static org.apache.cassandra.net.MessagingService.VERSION_51;
import static org.apache.cassandra.net.MessagingService.VERSION_60;
import static org.apache.cassandra.utils.Clock.Global.nanoTime;
public class CounterMutation implements IMutation
@ -387,9 +387,9 @@ public class CounterMutation implements IMutation
if (serializedSize50 == 0)
serializedSize50 = (int) serializer.serializedSize(this, VERSION_50);
return serializedSize50;
case VERSION_51:
case VERSION_60:
if (serializedSize51 == 0)
serializedSize51 = (int) serializer.serializedSize(this, VERSION_51);
serializedSize51 = (int) serializer.serializedSize(this, VERSION_60);
return serializedSize51;
default:
throw new IllegalStateException("Unknown serialization version: " + version);

View File

@ -62,7 +62,7 @@ import org.apache.cassandra.utils.concurrent.Future;
import static com.google.common.base.Preconditions.checkState;
import static org.apache.cassandra.net.MessagingService.VERSION_40;
import static org.apache.cassandra.net.MessagingService.VERSION_50;
import static org.apache.cassandra.net.MessagingService.VERSION_51;
import static org.apache.cassandra.net.MessagingService.VERSION_60;
import static org.apache.cassandra.utils.MonotonicClock.Global.approxTime;
public class Mutation implements IMutation, Supplier<Mutation>
@ -412,9 +412,9 @@ public class Mutation implements IMutation, Supplier<Mutation>
if (serializedSize50 == 0)
serializedSize50 = (int) serializer.serializedSize(this, VERSION_50);
return serializedSize50;
case VERSION_51:
case VERSION_60:
if (serializedSize51 == 0)
serializedSize51 = (int) serializer.serializedSize(this, VERSION_51);
serializedSize51 = (int) serializer.serializedSize(this, VERSION_60);
return serializedSize51;
default:
throw new IllegalStateException("Unknown serialization version: " + version);
@ -560,7 +560,7 @@ public class Mutation implements IMutation, Supplier<Mutation>
{
Map<TableId, PartitionUpdate> modifications = mutation.modifications;
if (version >= VERSION_51)
if (version >= VERSION_60)
{
int flags = 0;
flags |= potentialTxnConflictsFlag(mutation.potentialTxnConflicts);
@ -587,7 +587,7 @@ public class Mutation implements IMutation, Supplier<Mutation>
teeIn = new TeeDataInputPlus(in, dob, CACHEABLE_MUTATION_SIZE_LIMIT);
PotentialTxnConflicts potentialTxnConflicts = PotentialTxnConflicts.DISALLOW;
if (version >= VERSION_51)
if (version >= VERSION_60)
{
int flags = teeIn.readByte();
potentialTxnConflicts = potentialTxnConflicts(flags);
@ -689,7 +689,7 @@ public class Mutation implements IMutation, Supplier<Mutation>
long size = this.size;
if (size == 0L)
{
if (version >= VERSION_51)
if (version >= VERSION_60)
size += TypeSizes.sizeof((byte)ALLOW_POTENTIAL_TRANSACTION_CONFLICTS); // flags
size += TypeSizes.sizeofUnsignedVInt(mutation.modifications.size());
for (PartitionUpdate partitionUpdate : mutation.modifications.values())

View File

@ -1399,7 +1399,7 @@ public abstract class ReadCommand extends AbstractReadQuery
if (command.isDigestQuery())
out.writeUnsignedVInt32(command.digestVersion());
command.metadata().id.serialize(out);
if (version >= MessagingService.VERSION_51)
if (version >= MessagingService.VERSION_60)
Epoch.serializer.serialize(command.serializedAtEpoch, out);
out.writeInt(version >= MessagingService.VERSION_50 ? CassandraUInt.fromLong(command.nowInSec()) : (int) command.nowInSec());
serializeFiltersAndLimits(command, out, version);
@ -1454,7 +1454,7 @@ public abstract class ReadCommand extends AbstractReadQuery
TableId tableId = TableId.deserialize(in);
Epoch schemaVersion = Epoch.EMPTY;
if (version >= MessagingService.VERSION_51)
if (version >= MessagingService.VERSION_60)
schemaVersion = Epoch.serializer.deserialize(in);
TableMetadata tableMetadata;
try
@ -1510,7 +1510,7 @@ public abstract class ReadCommand extends AbstractReadQuery
return 2 // kind + flags
+ (command.isDigestQuery() ? TypeSizes.sizeofUnsignedVInt(command.digestVersion()) : 0)
+ command.metadata().id.serializedSize()
+ (version >= MessagingService.VERSION_51 ? Epoch.serializer.serializedSize(command.metadata().epoch) : 0)
+ (version >= MessagingService.VERSION_60 ? Epoch.serializer.serializedSize(command.metadata().epoch) : 0)
+ TypeSizes.INT_SIZE // command.nowInSec() is serialized as uint
+ ColumnFilter.serializer.serializedSize(command.columnFilter(), version)
+ RowFilter.serializer.serializedSize(command.rowFilter(), version)

View File

@ -68,7 +68,7 @@ class SnapshotCommandSerializer implements IVersionedSerializer<SnapshotCommand>
out.writeUTF(snapshot_command.column_family);
out.writeUTF(snapshot_command.snapshot_name);
out.writeBoolean(snapshot_command.clear_snapshot);
if (version >= MessagingService.VERSION_51)
if (version >= MessagingService.VERSION_60)
{
out.writeUnsignedVInt32(snapshot_command.ranges.size());
for (Range<Token> r : snapshot_command.ranges)
@ -85,7 +85,7 @@ class SnapshotCommandSerializer implements IVersionedSerializer<SnapshotCommand>
String column_family = in.readUTF();
String snapshot_name = in.readUTF();
boolean clear_snapshot = in.readBoolean();
if (version >= MessagingService.VERSION_51)
if (version >= MessagingService.VERSION_60)
{
IPartitioner partitioner = Keyspace.open(keyspace).getColumnFamilyStore(column_family).getPartitioner();
int count = in.readUnsignedVInt32();
@ -107,7 +107,7 @@ class SnapshotCommandSerializer implements IVersionedSerializer<SnapshotCommand>
+ TypeSizes.sizeof(sc.column_family)
+ TypeSizes.sizeof(sc.snapshot_name)
+ TypeSizes.sizeof(sc.clear_snapshot);
if (version >= MessagingService.VERSION_51)
if (version >= MessagingService.VERSION_60)
{
size += TypeSizes.sizeofUnsignedVInt(sc.ranges.size());
for (Range<Token> r : sc.ranges)

View File

@ -63,14 +63,14 @@ public class CommitLogDescriptor
public static final int VERSION_30 = 6;
public static final int VERSION_40 = 7;
public static final int VERSION_50 = 8;
public static final int VERSION_51 = 9;
public static final int VERSION_60 = 9;
/**
* Increment this number if there is a changes in the commit log disc layout or MessagingVersion changes.
* Note: make sure to handle {@link #getMessagingVersion()}
*/
@VisibleForTesting
public static final int current_version = DatabaseDescriptor.getStorageCompatibilityMode().isBefore(5) ? VERSION_40 : VERSION_51;
public static final int current_version = DatabaseDescriptor.getStorageCompatibilityMode().isBefore(5) ? VERSION_40 : VERSION_60;
final int version;
public final long id;
@ -226,8 +226,8 @@ public class CommitLogDescriptor
return MessagingService.VERSION_40;
case VERSION_50:
return MessagingService.VERSION_50;
case VERSION_51:
return MessagingService.VERSION_51;
case VERSION_60:
return MessagingService.VERSION_60;
default:
throw new IllegalStateException("Unknown commitlog version " + version);
}

View File

@ -395,8 +395,8 @@ public class IndexHints
}
// Ensure that all nodes in the cluster are in a version that supports index hints, including this one
Set<InetAddressAndPort> badNodes = MessagingService.instance().endpointsWithConnectionsOnVersionBelow(MessagingService.VERSION_51);
if (MessagingService.current_version < MessagingService.VERSION_51)
Set<InetAddressAndPort> badNodes = MessagingService.instance().endpointsWithConnectionsOnVersionBelow(MessagingService.VERSION_60);
if (MessagingService.current_version < MessagingService.VERSION_60)
badNodes.add(FBUtilities.getBroadcastAddressAndPort());
if (!badNodes.isEmpty())
throw new InvalidRequestException("Index hints are not supported in clusters below 14.");
@ -497,7 +497,7 @@ public class IndexHints
public void serialize(IndexHints hints, DataOutputPlus out, int version) throws IOException
{
// index hints are only supported in 14 and above, so don't serialize anything if the messaging version is lower
if (version < MessagingService.VERSION_51)
if (version < MessagingService.VERSION_60)
{
if (hints != NONE)
throw new IllegalStateException("Unable to serialize index hints with messaging version: " + version);
@ -514,7 +514,7 @@ public class IndexHints
public IndexHints deserialize(DataInputPlus in, int version, TableMetadata table) throws IOException
{
// index hints are only supported in 14 and above, so don't read anything if the messaging version is lower
if (version < MessagingService.VERSION_51)
if (version < MessagingService.VERSION_60)
return IndexHints.NONE;
// read the flags first to determine which types of hints are present
@ -535,7 +535,7 @@ public class IndexHints
public long serializedSize(IndexHints hints, int version)
{
// index hints are only supported in 14 and above, so no size if the messaging version is lower
if (version < MessagingService.VERSION_51)
if (version < MessagingService.VERSION_60)
return 0;
// size of flags

View File

@ -773,7 +773,7 @@ public class PartitionUpdate extends AbstractBTreePartition
assert !iter.isReverseOrder();
update.metadata.id.serialize(out);
if (version >= MessagingService.VERSION_51)
if (version >= MessagingService.VERSION_60)
Epoch.serializer.serialize(update.metadata.epoch != null ? update.metadata.epoch : Epoch.EMPTY, out);
UnfilteredRowIteratorSerializer.serializer.serialize(iter, null, out, version, update.rowCount());
}
@ -794,7 +794,7 @@ public class PartitionUpdate extends AbstractBTreePartition
{
TableId tableId = TableId.deserialize(in);
Epoch remoteVersion = null;
if (version >= MessagingService.VERSION_51)
if (version >= MessagingService.VERSION_60)
remoteVersion = Epoch.serializer.deserialize(in);
TableMetadata tableMetadata;
try
@ -864,7 +864,7 @@ public class PartitionUpdate extends AbstractBTreePartition
if (position >= in.limit())
throw new EOFException();
if (version >= MessagingService.VERSION_51)
if (version >= MessagingService.VERSION_60)
{
long epoch = VIntCoding.getUnsignedVInt(in, position);
position += VIntCoding.computeUnsignedVIntSize(epoch);
@ -884,7 +884,7 @@ public class PartitionUpdate extends AbstractBTreePartition
try (UnfilteredRowIterator iter = update.unfilteredIterator())
{
return update.metadata.id.serializedSize()
+ (version >= MessagingService.VERSION_51 ? Epoch.serializer.serializedSize(update.metadata.epoch) : 0)
+ (version >= MessagingService.VERSION_60 ? Epoch.serializer.serializedSize(update.metadata.epoch) : 0)
+ UnfilteredRowIteratorSerializer.serializer.serializedSize(iter, null, version, update.rowCount());
}
}

View File

@ -73,7 +73,7 @@ public class RequestFailure
public void serialize(RequestFailure t, DataOutputPlus out, int version) throws IOException
{
RequestFailureReason.serializer.serialize(t.reason, out, version);
if (version >= MessagingService.VERSION_51)
if (version >= MessagingService.VERSION_60)
nullableRemoteExceptionSerializer.serialize(t.failure, out, version);
}
@ -82,7 +82,7 @@ public class RequestFailure
{
RequestFailureReason reason = RequestFailureReason.serializer.deserialize(in, version);
Throwable failure = null;
if (version >= MessagingService.VERSION_51)
if (version >= MessagingService.VERSION_60)
failure = nullableRemoteExceptionSerializer.deserialize(in, version);
if (failure == null)
return forReason(reason);
@ -94,7 +94,7 @@ public class RequestFailure
public long serializedSize(RequestFailure t, int version)
{
long size = RequestFailureReason.serializer.serializedSize(t.reason, version);
if (version >= MessagingService.VERSION_51)
if (version >= MessagingService.VERSION_60)
size += nullableRemoteExceptionSerializer.serializedSize(t.failure, version);
return size;
}

View File

@ -89,7 +89,7 @@ class GossipDigestSynSerializer implements IVersionedSerializer<GossipDigestSyn>
{
out.writeUTF(gDigestSynMessage.clusterId);
out.writeUTF(gDigestSynMessage.partioner);
if (version >= MessagingService.VERSION_51)
if (version >= MessagingService.VERSION_60)
out.writeUnsignedVInt32(gDigestSynMessage.metadataId);
GossipDigestSerializationHelper.serialize(gDigestSynMessage.gDigests, out, version);
}
@ -99,7 +99,7 @@ class GossipDigestSynSerializer implements IVersionedSerializer<GossipDigestSyn>
String clusterId = in.readUTF();
String partioner = null;
partioner = in.readUTF();
int metadataId = version >= MessagingService.VERSION_51
int metadataId = version >= MessagingService.VERSION_60
? in.readUnsignedVInt32()
: ClusterMetadata.EMPTY_METADATA_IDENTIFIER;
List<GossipDigest> gDigests = GossipDigestSerializationHelper.deserialize(in, version);
@ -110,7 +110,7 @@ class GossipDigestSynSerializer implements IVersionedSerializer<GossipDigestSyn>
{
long size = TypeSizes.sizeof(syn.clusterId);
size += TypeSizes.sizeof(syn.partioner);
if (version >= MessagingService.VERSION_51)
if (version >= MessagingService.VERSION_60)
size += TypeSizes.sizeofUnsignedVInt(syn.metadataId);
size += GossipDigestSerializationHelper.serializedSize(syn.gDigests, version);
return size;

View File

@ -70,8 +70,8 @@ final class HintsDescriptor
static final int VERSION_30 = 1;
static final int VERSION_40 = 2;
static final int VERSION_50 = 3;
static final int VERSION_51 = 4;
static final int CURRENT_VERSION = DatabaseDescriptor.getStorageCompatibilityMode().isBefore(5) ? VERSION_40 : VERSION_51;
static final int VERSION_60 = 4;
static final int CURRENT_VERSION = DatabaseDescriptor.getStorageCompatibilityMode().isBefore(5) ? VERSION_40 : VERSION_60;
static final String COMPRESSION = "compression";
static final String ENCRYPTION = "encryption";
@ -259,8 +259,8 @@ final class HintsDescriptor
return MessagingService.VERSION_40;
case VERSION_50:
return MessagingService.VERSION_50;
case VERSION_51:
return MessagingService.VERSION_51;
case VERSION_60:
return MessagingService.VERSION_60;
default:
throw new AssertionError();
}

View File

@ -110,7 +110,7 @@ public final class ClientMetrics
/**
* @deprecated by {@link #markAuthSuccess(AuthenticationMode)}
*/
@Deprecated(since="5.1", forRemoval = true)
@Deprecated(since="6.0", forRemoval = true)
public void markAuthSuccess()
{
markAuthSuccess(null);
@ -127,7 +127,7 @@ public final class ClientMetrics
/**
* @deprecated by {@link #markAuthFailure(AuthenticationMode)}
*/
@Deprecated(since="5.1", forRemoval = true)
@Deprecated(since="6.0", forRemoval = true)
public void markAuthFailure()
{
markAuthFailure(null);

View File

@ -60,7 +60,7 @@ import static org.apache.cassandra.db.TypeSizes.sizeof;
import static org.apache.cassandra.db.TypeSizes.sizeofUnsignedVInt;
import static org.apache.cassandra.net.MessagingService.VERSION_40;
import static org.apache.cassandra.net.MessagingService.VERSION_50;
import static org.apache.cassandra.net.MessagingService.VERSION_51;
import static org.apache.cassandra.net.MessagingService.VERSION_60;
import static org.apache.cassandra.utils.FBUtilities.getBroadcastAddressAndPort;
import static org.apache.cassandra.utils.MonotonicClock.Global.approxTime;
import static org.apache.cassandra.utils.vint.VIntCoding.computeUnsignedVIntSize;
@ -922,7 +922,7 @@ public class Message<T> implements ResponseContext
return -1; // not enough bytes to read id
index += idSize;
if (version >= VERSION_51)
if (version >= VERSION_60)
{
int epochSize = computeUnsignedVIntSize(buf, index, readerLimit);
if (epochSize < 0)
@ -984,7 +984,7 @@ public class Message<T> implements ResponseContext
index += computeUnsignedVIntSize(id);
Epoch epoch = Epoch.EMPTY;
if (version >= VERSION_51)
if (version >= VERSION_60)
{
long epochl = getUnsignedVInt(buf, index);
index += computeUnsignedVIntSize(epochl);
@ -1018,7 +1018,7 @@ public class Message<T> implements ResponseContext
private void serializeHeader(Header header, DataOutputPlus out, int version) throws IOException
{
out.writeUnsignedVInt(header.id);
if (version >= VERSION_51)
if (version >= VERSION_60)
Epoch.messageSerializer.serialize(header.epoch, out, version);
// int cast cuts off the high-order half of the timestamp, which we can assume remains
// the same between now and when the recipient reconstructs it.
@ -1033,7 +1033,7 @@ public class Message<T> implements ResponseContext
{
long id = in.readUnsignedVInt();
Epoch epoch = Epoch.EMPTY;
if (version >= VERSION_51)
if (version >= VERSION_60)
epoch = Epoch.messageSerializer.deserialize(in, version);
long currentTimeNanos = approxTime.now();
MonotonicClockTranslation timeSnapshot = approxTime.translate();
@ -1049,7 +1049,7 @@ public class Message<T> implements ResponseContext
private void skipHeader(DataInputPlus in, int version) throws IOException
{
skipUnsignedVInt(in); // id
if (version >= VERSION_51)
if (version >= VERSION_60)
skipUnsignedVInt(in); // epoch
in.skipBytesFully(4); // createdAt
skipUnsignedVInt(in); // expiresIn
@ -1062,7 +1062,7 @@ public class Message<T> implements ResponseContext
{
long size = 0;
size += sizeofUnsignedVInt(header.id);
if (version >= VERSION_51)
if (version >= VERSION_60)
size += sizeofUnsignedVInt(header.epoch.getEpoch());
size += CREATION_TIME_SIZE;
size += sizeofUnsignedVInt(NANOSECONDS.toMillis(header.expiresAtNanos - header.createdAtNanos));
@ -1279,9 +1279,9 @@ public class Message<T> implements ResponseContext
if (serializedSize50 == 0)
serializedSize50 = serializer.serializedSize(this, VERSION_50);
return serializedSize50;
case VERSION_51:
case VERSION_60:
if (serializedSize51 == 0)
serializedSize51 = serializer.serializedSize(this, VERSION_51);
serializedSize51 = serializer.serializedSize(this, VERSION_60);
return serializedSize51;
default:
throw new IllegalStateException("Unknown serialization version " + version);
@ -1304,9 +1304,9 @@ public class Message<T> implements ResponseContext
if (payloadSize50 < 0)
payloadSize50 = serializer.payloadSize(this, VERSION_50);
return payloadSize50;
case VERSION_51:
case VERSION_60:
if (payloadSize51 < 0)
payloadSize51 = serializer.payloadSize(this, VERSION_51);
payloadSize51 = serializer.payloadSize(this, VERSION_60);
return payloadSize51;
default:

View File

@ -225,9 +225,9 @@ public class MessagingService extends MessagingServiceMBeanImpl implements Messa
// c14227 TTL overflow, 'uint' timestamps
VERSION_50(13),
// TCM, index hints
VERSION_51(14);
VERSION_60(14);
public static final Version MIN_ACCORD_VERSION = Version.VERSION_51;
public static final Version MIN_ACCORD_VERSION = Version.VERSION_60;
public final int value;
@ -265,9 +265,9 @@ public class MessagingService extends MessagingServiceMBeanImpl implements Messa
public static final int VERSION_3014 = 11;
public static final int VERSION_40 = 12;
public static final int VERSION_50 = 13; // c14227 TTL overflow, 'uint' timestamps
public static final int VERSION_51 = 14; // TCM, index hints
public static final int VERSION_60 = 14; // TCM, index hints
public static final int minimum_version = VERSION_40;
public static final int maximum_version = VERSION_51;
public static final int maximum_version = VERSION_60;
// we want to use a modified behavior for the tools and clients - that is, since they are not running a server, they
// should not need to run in a compatibility mode. They should be able to connect to the server regardless whether
// it uses messaving version 4 or 5
@ -309,7 +309,7 @@ public class MessagingService extends MessagingServiceMBeanImpl implements Messa
private static Version currentVersion()
{
return DatabaseDescriptor.getStorageCompatibilityMode().isBefore(5) ? Version.VERSION_40 : Version.VERSION_51;
return DatabaseDescriptor.getStorageCompatibilityMode().isBefore(5) ? Version.VERSION_40 : Version.VERSION_60;
}
private static class MSHandle

View File

@ -149,7 +149,7 @@ public class RepairJobDesc
String keyspace = in.readUTF();
String columnFamily = in.readUTF();
IPartitioner partitioner = version >= MessagingService.VERSION_51
IPartitioner partitioner = version >= MessagingService.VERSION_60
? partitioner(keyspace, columnFamily)
: IPartitioner.global();

View File

@ -108,7 +108,7 @@ public class PrepareMessage extends RepairMessage
for (TableId tableId : message.tableIds)
tableId.serialize(out);
message.parentRepairSession.serialize(out);
if (version >= MessagingService.VERSION_51)
if (version >= MessagingService.VERSION_60)
out.writeUTF(message.partitioner.getClass().getCanonicalName());
out.writeInt(message.ranges.size());
for (Range<Token> r : message.ranges)
@ -128,7 +128,7 @@ public class PrepareMessage extends RepairMessage
for (int i = 0; i < tableIdCount; i++)
tableIds.add(TableId.deserialize(in));
TimeUUID parentRepairSession = TimeUUID.deserialize(in);
IPartitioner partitioner = version >= MessagingService.VERSION_51
IPartitioner partitioner = version >= MessagingService.VERSION_60
? FBUtilities.newPartitioner(in.readUTF())
: IPartitioner.global();
int rangeCount = in.readInt();
@ -149,7 +149,7 @@ public class PrepareMessage extends RepairMessage
for (TableId tableId : message.tableIds)
size += tableId.serializedSize();
size += TimeUUID.sizeInBytes();
if (version >= MessagingService.VERSION_51)
if (version >= MessagingService.VERSION_60)
size += TypeSizes.sizeof(message.partitioner.getClass().getCanonicalName());
size += TypeSizes.sizeof(message.ranges.size());
for (Range<Token> r : message.ranges)

View File

@ -75,7 +75,7 @@ public class ValidationRequest extends RepairMessage
{
RepairJobDesc.serializer.serialize(message.desc, out, version);
out.writeInt(version >= MessagingService.VERSION_50 ? CassandraUInt.fromLong(message.nowInSec) : (int) message.nowInSec);
if (version >= MessagingService.VERSION_51)
if (version >= MessagingService.VERSION_60)
out.writeBoolean(message.dontPurgeTombstones);
}
@ -83,7 +83,7 @@ public class ValidationRequest extends RepairMessage
{
RepairJobDesc desc = RepairJobDesc.serializer.deserialize(dis, version);
long nowInsec = version >= MessagingService.VERSION_50 ? CassandraUInt.toLong(dis.readInt()) : dis.readInt();
boolean dontPurgeTombstones = version >= MessagingService.VERSION_51 ? dis.readBoolean() : false;
boolean dontPurgeTombstones = version >= MessagingService.VERSION_60 ? dis.readBoolean() : false;
return new ValidationRequest(desc, nowInsec, dontPurgeTombstones);
}
@ -91,7 +91,7 @@ public class ValidationRequest extends RepairMessage
{
long size = RepairJobDesc.serializer.serializedSize(message.desc, version);
size += TypeSizes.INT_SIZE;
size += version >= MessagingService.VERSION_51 ? TypeSizes.sizeof(message.dontPurgeTombstones) : 0;
size += version >= MessagingService.VERSION_60 ? TypeSizes.sizeof(message.dontPurgeTombstones) : 0;
return size;
}
};

View File

@ -67,11 +67,11 @@ public class DistributedSchema implements MetadataValue<DistributedSchema>
public static DistributedSchema first(Set<String> knownDatacenters)
{
// During upgrades from pre-5.1 versions, the replication params of the system_cluster_metadata
// During upgrades from pre-6.0 versions, the replication params of the system_cluster_metadata
// keyspace using one of the existing DCs. This is so that this keyspace does not cause issues
// for tooling, clients or control plane systems which may inspect schema and have specific
// expectations about DC layout. This keyspace is unused until the CMS is initialized.
// For new clusters which start out on 5.1 or later, this is not necessary to the initial
// For new clusters which start out on 6.0 or later, this is not necessary to the initial
// replication params use a empty string for the placeholder DC name.
// During CMS initialization, the replication of this keyspace will be set for real using

View File

@ -34,20 +34,20 @@ public enum Version implements MessageVersionProvider
{
// If MessagingService version bumps, this mapping does not need to be updated; only updates needed are those that
// include accord serializer changes.
V1(1, MessagingService.Version.VERSION_51);
V1(1, MessagingService.Version.VERSION_60);
public static final Version LATEST = Version.V1;
/**
* Version that should be used for disk serialization where downgrade may be possible.
*
* As of this writing only 1 version exists, so this is the same as LATEST... Once v2 comes into the picture we need this version to be the oldest version needed for downgrade... If you upgrade from 5.1 to 5.2 (assuming this adds a v2) you need a version that works with 5.1 here.
* As of this writing only 1 version exists, so this is the same as LATEST... Once v2 comes into the picture we need this version to be the oldest version needed for downgrade... If you upgrade from 6.0 to 7.0 (assuming this adds a v2) you need a version that works with 6.0 here.
*/
public static final Version DOWNGRADE_SAFE_VERSION = Version.V1;
/**
* Version that should be used for messaging serialization where mixed versions may be possible.
*
* As of this writing only 1 version exists, so this is the same as LATEST... Once v2 comes into the picture we need this version to be the oldest version needed for downgrade... If you upgrade from 5.1 to 5.2 (assuming this adds a v2) you need a version that works with 5.1 here.
* As of this writing only 1 version exists, so this is the same as LATEST... Once v2 comes into the picture we need this version to be the oldest version needed for downgrade... If you upgrade from 6.0 to 7.0 (assuming this adds a v2) you need a version that works with 6.0 here.
*/
public static final Version CLUSTER_SAFE_VERSION = Version.V1;

View File

@ -505,15 +505,15 @@ public class PaxosPrepare extends PaxosRequestCallback<PaxosPrepare.Response> im
Permitted permitted = response.permitted();
// If the peer's local electorate disagreed with ours it will be signalled in the permitted response.
// Pre 5.1 this used gossip state to assess the relative currency of either peer's view of the ring/placements
// from which the electorate is derived. Post 5.1, this is driven by cluster metadata rather than gossip but we
// Pre 6.0 this used gossip state to assess the relative currency of either peer's view of the ring/placements
// from which the electorate is derived. Post 6.0, this is driven by cluster metadata rather than gossip but we
// preserve the signalling via gossip state for continuity during upgrades
Epoch remoteElectorateEpoch = permitted.electorateEpoch;
if (remoteElectorateEpoch.is(Epoch.EMPTY) && permitted.gossipInfo.isEmpty())
{
// we agree about the electorate, so can simply accept the promise/permission
// TODO: once 5.1 is the minimum supported version, we can stop sending and checking gossipInfo and just
// TODO: once 6.0 is the minimum supported version, we can stop sending and checking gossipInfo and just
// use the electorateEpoch
permitted(permitted, from);
}
@ -527,8 +527,8 @@ public class PaxosPrepare extends PaxosRequestCallback<PaxosPrepare.Response> im
}
else
{
// The remote peer indicated a mismatch, but is either still running a pre-5.1 version or we have not yet
// initialized the CMS following upgrade to 5.1. Topology changes while in this state are not supported,
// The remote peer indicated a mismatch, but is either still running a pre-6.0 version or we have not yet
// initialized the CMS following upgrade to 6.0. Topology changes while in this state are not supported,
// failed nodes must be DOWN during upgrade and should be replaced after the CMS has been initialized.
if (needsGossipUpdate(permitted.gossipInfo))
{
@ -1163,7 +1163,7 @@ public class PaxosPrepare extends PaxosRequestCallback<PaxosPrepare.Response> im
request.partitionKey,
consistency(request.ballot));
Map<InetAddressAndPort, EndpointState> gossipInfo = verifyElectorate(request.electorate, localElectorate);
// TODO when 5.1 is the minimum supported version we can modify verifyElectorate to just return this epoch
// TODO when 6.0 is the minimum supported version we can modify verifyElectorate to just return this epoch
Epoch electorateEpoch = gossipInfo.isEmpty() ? Epoch.EMPTY : localElectorate.createdAt;
ReadResponse readResponse = null;
@ -1244,7 +1244,7 @@ public class PaxosPrepare extends PaxosRequestCallback<PaxosPrepare.Response> im
request.table.id.serialize(out);
DecoratedKey.serializer.serialize(request.partitionKey, out, version);
}
if (version >= MessagingService.VERSION_51)
if (version >= MessagingService.VERSION_60)
out.writeBoolean(request.isForRecovery);
}
@ -1257,7 +1257,7 @@ public class PaxosPrepare extends PaxosRequestCallback<PaxosPrepare.Response> im
{
SinglePartitionReadCommand readCommand = (SinglePartitionReadCommand) ReadCommand.serializer.deserialize(in, version);
boolean isForRecovery = false;
if (version >= MessagingService.VERSION_51)
if (version >= MessagingService.VERSION_60)
isForRecovery = in.readBoolean();
return construct(param, ballot, electorate, readCommand, (flag & 2) == 0, isForRecovery);
}
@ -1266,7 +1266,7 @@ public class PaxosPrepare extends PaxosRequestCallback<PaxosPrepare.Response> im
TableMetadata table = Schema.instance.getExistingTableMetadata(TableId.deserialize(in));
DecoratedKey partitionKey = (DecoratedKey) DecoratedKey.serializer.deserialize(in, table.partitioner, version);
boolean isForRecovery = false;
if (version >= MessagingService.VERSION_51)
if (version >= MessagingService.VERSION_60)
isForRecovery = in.readBoolean();
return construct(param, ballot, electorate, partitionKey, table, (flag & 2) != 0, isForRecovery);
}
@ -1281,7 +1281,7 @@ public class PaxosPrepare extends PaxosRequestCallback<PaxosPrepare.Response> im
? ReadCommand.serializer.serializedSize(request.read, version)
: request.table.id.serializedSize()
+ DecoratedKey.serializer.serializedSize(request.partitionKey, version));
if (version >= MessagingService.VERSION_51)
if (version >= MessagingService.VERSION_60)
size += TypeSizes.sizeof(request.isForRecovery);
return size;
}
@ -1331,7 +1331,7 @@ public class PaxosPrepare extends PaxosRequestCallback<PaxosPrepare.Response> im
if (promised.readResponse != null)
ReadResponse.serializer.serialize(promised.readResponse, out, version);
serializeMap(promised.gossipInfo, out, version, inetAddressAndPortSerializer, EndpointState.nullableSerializer);
if (version >= MessagingService.VERSION_51)
if (version >= MessagingService.VERSION_60)
Epoch.messageSerializer.serialize(promised.electorateEpoch, out, version);
if (promised.outcome == PERMIT_READ)
promised.supersededBy.serialize(out);
@ -1353,7 +1353,7 @@ public class PaxosPrepare extends PaxosRequestCallback<PaxosPrepare.Response> im
Committed committed = Committed.serializer.deserialize(in, version);
ReadResponse readResponse = (flags & 4) != 0 ? ReadResponse.serializer.deserialize(in, version) : null;
Map<InetAddressAndPort, EndpointState> gossipInfo = deserializeMap(in, version, inetAddressAndPortSerializer, EndpointState.nullableSerializer);
Epoch electorateEpoch = version >= MessagingService.VERSION_51 ? Epoch.messageSerializer.deserialize(in, version) : Epoch.EMPTY;
Epoch electorateEpoch = version >= MessagingService.VERSION_60 ? Epoch.messageSerializer.deserialize(in, version) : Epoch.EMPTY;
MaybePromise.Outcome outcome = (flags & 16) != 0 ? PERMIT_READ : PROMISE;
boolean hasProposalStability = (flags & 8) != 0;
Ballot supersededBy = null;
@ -1378,7 +1378,7 @@ public class PaxosPrepare extends PaxosRequestCallback<PaxosPrepare.Response> im
+ Committed.serializer.serializedSize(permitted.latestCommitted, version)
+ (permitted.readResponse == null ? 0 : ReadResponse.serializer.serializedSize(permitted.readResponse, version))
+ serializedMapSize(permitted.gossipInfo, version, inetAddressAndPortSerializer, EndpointState.nullableSerializer)
+ (version >= MessagingService.VERSION_51 ? Epoch.messageSerializer.serializedSize(permitted.electorateEpoch, version) : 0)
+ (version >= MessagingService.VERSION_60 ? Epoch.messageSerializer.serializedSize(permitted.electorateEpoch, version) : 0)
+ (permitted.outcome == PERMIT_READ ? Ballot.sizeInBytes() : 0);
}

View File

@ -352,7 +352,7 @@ public class PaxosRepairHistory
{
public void serialize(PaxosRepairHistory history, DataOutputPlus out, int version) throws IOException
{
if (version >= MessagingService.VERSION_51)
if (version >= MessagingService.VERSION_60)
out.writeUTF(history.partitioner.getClass().getCanonicalName());
out.writeUnsignedVInt32(history.size());
for (int i = 0; i < history.size() ; ++i)
@ -365,7 +365,7 @@ public class PaxosRepairHistory
public PaxosRepairHistory deserialize(DataInputPlus in, int version) throws IOException
{
IPartitioner partitioner = version >= MessagingService.VERSION_51
IPartitioner partitioner = version >= MessagingService.VERSION_60
? FBUtilities.newPartitioner(in.readUTF())
: IPartitioner.global();
int size = in.readUnsignedVInt32();
@ -383,7 +383,7 @@ public class PaxosRepairHistory
public long serializedSize(PaxosRepairHistory history, int version)
{
long size = 0;
if (version >= MessagingService.VERSION_51)
if (version >= MessagingService.VERSION_60)
size += TypeSizes.sizeof(history.partitioner.getClass().getCanonicalName());
size += TypeSizes.sizeofUnsignedVInt(history.size());
for (int i = 0; i < history.size() ; ++i)

View File

@ -83,7 +83,7 @@ public class PaxosStartPrepareCleanup extends AsyncFuture<PaxosCleanupHistory> i
}
/**
* We run paxos repair as part of topology changes, so prior to 5.1 we would include the local endpoint state in
* We run paxos repair as part of topology changes, so prior to 6.0 we would include the local endpoint state in
* the paxos repair prepare message to prevent racing with gossip dissemination and guarantee that every repair
* participant is aware of the pending ring change during repair. This is now deprecated as topology changes are no
* longer driven by gossip state. We continue to include the state in internode messages temporarily for
@ -127,7 +127,7 @@ public class PaxosStartPrepareCleanup extends AsyncFuture<PaxosCleanupHistory> i
public static class Request
{
final TableId tableId;
@Deprecated(since = "5.1")
@Deprecated(since = "6.0")
final EndpointState epState;
final Collection<Range<Token>> ranges;
@ -144,8 +144,8 @@ public class PaxosStartPrepareCleanup extends AsyncFuture<PaxosCleanupHistory> i
public void serialize(Request request, DataOutputPlus out, int version) throws IOException
{
request.tableId.serialize(out);
// Post-5.1 topology is not driven by gossip state
if (version < MessagingService.VERSION_51)
// Post-6.0 topology is not driven by gossip state
if (version < MessagingService.VERSION_60)
EndpointState.serializer.serialize(request.epState, out, version);
out.writeInt(request.ranges.size());
for (Range<Token> rt : request.ranges)
@ -155,7 +155,7 @@ public class PaxosStartPrepareCleanup extends AsyncFuture<PaxosCleanupHistory> i
public Request deserialize(DataInputPlus in, int version) throws IOException
{
TableId tableId = TableId.deserialize(in);
EndpointState epState = version < MessagingService.VERSION_51
EndpointState epState = version < MessagingService.VERSION_60
? EndpointState.serializer.deserialize(in, version)
: new EndpointState(HeartBeatState.empty());
@ -174,7 +174,7 @@ public class PaxosStartPrepareCleanup extends AsyncFuture<PaxosCleanupHistory> i
public long serializedSize(Request request, int version)
{
long size = request.tableId.serializedSize();
if (version < MessagingService.VERSION_51)
if (version < MessagingService.VERSION_60)
size += EndpointState.serializer.serializedSize(request.epState, version);
size += TypeSizes.sizeof(request.ranges.size());
for (Range<Token> range : request.ranges)
@ -189,7 +189,7 @@ public class PaxosStartPrepareCleanup extends AsyncFuture<PaxosCleanupHistory> i
if (DatabaseDescriptor.getAccordTransactionsEnabled())
ClusterMetadataService.instance().fetchLogFromPeerOrCMS(in.from(), in.epoch());
ColumnFamilyStore table = Schema.instance.getColumnFamilyStoreInstance(in.payload.tableId);
// Note: pre-5.1 we would use gossip state included in the request payload to update topology
// Note: pre-6.0 we would use gossip state included in the request payload to update topology
// prior to cleanup. Topology is no longer derived from gossip state, so this has been removed.
Ballot highBound = newBallot(ballotTracker().getHighBound(), ConsistencyLevel.SERIAL);
PaxosRepairHistory history = table.getPaxosRepairHistoryForRanges(in.payload.ranges);

View File

@ -96,7 +96,7 @@ public class StreamSummary implements Serializable
out.writeInt(summary.files);
out.writeLong(summary.totalSize);
Token.logPartitioner = true;
if (version >= MessagingService.VERSION_51)
if (version >= MessagingService.VERSION_60)
CollectionSerializers.serializeCollection(summary.ranges, out, version, Range.rangeSerializer);
Token.logPartitioner = false;
}
@ -108,7 +108,7 @@ public class StreamSummary implements Serializable
int files = in.readInt();
long totalSize = in.readLong();
List<Range<Token>> ranges = ImmutableList.of();
if (version >= MessagingService.VERSION_51)
if (version >= MessagingService.VERSION_60)
{
TableMetadata tableMetadata = Schema.instance.getTableMetadata(tableId);
IPartitioner p = tableMetadata != null ? tableMetadata.partitioner : IPartitioner.global();
@ -124,7 +124,7 @@ public class StreamSummary implements Serializable
long size = summary.tableId.serializedSize();
size += TypeSizes.sizeof(summary.files);
size += TypeSizes.sizeof(summary.totalSize);
if (version >= MessagingService.VERSION_51)
if (version >= MessagingService.VERSION_60)
size += CollectionSerializers.serializedCollectionSize(summary.ranges, version, Range.rangeSerializer);
return size;
}

View File

@ -50,7 +50,7 @@ public class SystemKeyspaceStorage implements LogStorage
* If you make any changes to the tables below, make sure to increment the
* generation and document your change here.
* <p>
* gen 0: original definition in 5.1
* gen 0: original definition in 6.0
*/
public static final long GENERATION = 0;

View File

@ -559,7 +559,7 @@ public class Directory implements MetadataValue<Directory>
else
{
out.writeBoolean(true);
UUIDSerializer.serializer.serialize(node.hostId, out, MessagingService.VERSION_51);
UUIDSerializer.serializer.serialize(node.hostId, out, MessagingService.VERSION_60);
}
}
@ -572,7 +572,7 @@ public class Directory implements MetadataValue<Directory>
NodeState state = NodeState.values()[in.readInt()];
NodeVersion nodeVersion = NodeVersion.serializer.deserialize(in, version);
boolean hasHostId = in.readBoolean();
UUID hostId = hasHostId ? UUIDSerializer.serializer.deserialize(in, MessagingService.VERSION_51) : null;
UUID hostId = hasHostId ? UUIDSerializer.serializer.deserialize(in, MessagingService.VERSION_60) : null;
return new Node(id, addresses, location, state, nodeVersion, hostId);
}
@ -587,7 +587,7 @@ public class Directory implements MetadataValue<Directory>
size += NodeVersion.serializer.serializedSize(node.version, version);
size += TypeSizes.BOOL_SIZE;
if (node.hostId != null)
size += UUIDSerializer.serializer.serializedSize(node.hostId, MessagingService.VERSION_51);
size += UUIDSerializer.serializer.serializedSize(node.hostId, MessagingService.VERSION_60);
return size;
}
}

View File

@ -365,7 +365,7 @@ public class InstanceConfig implements IInstanceConfig
{
// Versions before 4.0 need to set 'seed_provider' without specifying the port
// Versions before 5.0 need to set 'endpoint_snitch', not initial_location_provider + node_proximity
if (version.compareTo(UpgradeTestBase.v51) >= 0)
if (version.compareTo(UpgradeTestBase.v60) >= 0)
return this;
InstanceConfig config = new InstanceConfig(this);

View File

@ -54,7 +54,7 @@ public class ClusterMetadataUpgradeHibernateTest extends UpgradeTestBase
.runAfterClusterUpgrade((cluster) -> {
// manually upgrade node3 to be able to keep join_ring=false
cluster.get(3).shutdown().get();
cluster.get(3).setVersion(Versions.find().getLatest(v51));
cluster.get(3).setVersion(Versions.find().getLatest(v60));
assertTrue(hibernating(cluster.get(1), "127.0.0.3"));
withProperty(CassandraRelevantProperties.JOIN_RING, false, () -> cluster.get(3).startup());
cluster.forEach(i -> checkPlacements(i, true));

View File

@ -67,7 +67,7 @@ public class ClusterMetadataUpgradeJoinRingTest extends UpgradeTestBase
// node4 not upgraded yet - should be allowed to vote despite being join_ring=false:
cluster.get(1).nodetoolResult("cms", "initialize").asserts().failure();
cluster.get(4).shutdown().get();
cluster.get(4).setVersion(Versions.find().getLatest(v51));
cluster.get(4).setVersion(Versions.find().getLatest(v60));
withProperty(CassandraRelevantProperties.JOIN_RING, false, () -> cluster.get(4).startup());
checkGossipinfo(cluster, false);
checkPlacements(cluster.get(1), "127.0.0.4", false);

View File

@ -99,15 +99,15 @@ public class UpgradeTestBase extends DistributedTestBase
public static final Semver v41 = new Semver("4.1-alpha1", SemverType.LOOSE);
public static final Semver v42 = new Semver("4.2-alpha1", SemverType.LOOSE);
public static final Semver v50 = new Semver("5.0-alpha1", SemverType.LOOSE);
public static final Semver v51 = new Semver("5.1-alpha1", SemverType.LOOSE);
public static final Semver v60 = new Semver("6.0-alpha1", SemverType.LOOSE);
protected static final SimpleGraph<Semver> SUPPORTED_UPGRADE_PATHS = new SimpleGraph.Builder<Semver>()
.addEdge(v40, v41)
.addEdge(v40, v50)
.addEdge(v40, v51)
.addEdge(v40, v60)
.addEdge(v41, v50)
.addEdge(v41, v51)
.addEdge(v50, v51)
.addEdge(v41, v60)
.addEdge(v50, v60)
.build();
// the last is always the current

View File

@ -42,7 +42,7 @@ public class AbstractSerializationsTester
put("3.0", MessagingService.VERSION_30);
put("4.0", MessagingService.VERSION_40);
put("5.0", MessagingService.VERSION_50);
put("5.1", MessagingService.VERSION_51);
put("5.1", MessagingService.VERSION_60);
}};
protected static final boolean EXECUTE_WRITES = TEST_SERIALIZATION_WRITES.getBoolean();

View File

@ -170,9 +170,9 @@ public class ConfigCompatibilityTest
}
@Test
public void diff_5_1() throws IOException
public void diff_6_0() throws IOException
{
diff(TEST_DIR + "/version=5.1-alpha1.yml", ImmutableSet.<String>builder()
diff(TEST_DIR + "/version=6.0-alpha1.yml", ImmutableSet.<String>builder()
.build(), ImmutableSet.of());
}

View File

@ -451,11 +451,11 @@ public class IndexHintsTest extends CQLTester
{
// ...with a version that supports index hints
DataOutputBuffer out = new DataOutputBuffer();
ReadCommand.serializer.serialize(command, out, MessagingService.VERSION_51);
Assertions.assertThat(ReadCommand.serializer.serializedSize(command, MessagingService.VERSION_51))
ReadCommand.serializer.serialize(command, out, MessagingService.VERSION_60);
Assertions.assertThat(ReadCommand.serializer.serializedSize(command, MessagingService.VERSION_60))
.isEqualTo(out.buffer().remaining());
DataInputBuffer in = new DataInputBuffer(out.buffer(), true);
command = ReadCommand.serializer.deserialize(in, MessagingService.VERSION_51);
command = ReadCommand.serializer.deserialize(in, MessagingService.VERSION_60);
actualHints = command.rowFilter().indexHints;
Assertions.assertThat(actualHints).isEqualTo(expectedHints);
@ -1110,7 +1110,7 @@ public class IndexHintsTest extends CQLTester
try (DataOutputBuffer out = new DataOutputBuffer())
{
IndexHints hints = IndexHints.create(indexes, null);
Assertions.assertThatThrownBy(() -> IndexHints.serializer.serialize(hints, out, MessagingService.VERSION_51))
Assertions.assertThatThrownBy(() -> IndexHints.serializer.serialize(hints, out, MessagingService.VERSION_60))
.isInstanceOf(AssertionError.class)
.hasMessageContaining(TOO_MANY_INDEXES_ERROR + indexes.size());
}
@ -1119,7 +1119,7 @@ public class IndexHintsTest extends CQLTester
try (DataOutputBuffer out = new DataOutputBuffer())
{
IndexHints hints = IndexHints.create(null, indexes);
Assertions.assertThatThrownBy(() -> IndexHints.serializer.serialize(hints, out, MessagingService.VERSION_51))
Assertions.assertThatThrownBy(() -> IndexHints.serializer.serialize(hints, out, MessagingService.VERSION_60))
.isInstanceOf(AssertionError.class)
.hasMessageContaining(TOO_MANY_INDEXES_ERROR + indexes.size());
}

View File

@ -50,7 +50,7 @@ import static com.google.common.base.Throwables.getStackTraceAsString;
import static org.apache.cassandra.exceptions.RemoteExceptionTest.normalizeThrowable;
import static org.apache.cassandra.net.Message.serializer;
import static org.apache.cassandra.net.MessagingService.VERSION_40;
import static org.apache.cassandra.net.MessagingService.VERSION_51;
import static org.apache.cassandra.net.MessagingService.VERSION_60;
import static org.apache.cassandra.net.NoPayload.noPayload;
import static org.apache.cassandra.net.ParamType.RESPOND_TO;
import static org.apache.cassandra.net.ParamType.TRACE_SESSION;
@ -342,7 +342,7 @@ public class MessageTest
RequestFailure reason1 = (RequestFailure)msg1.payload;
RequestFailure reason2 = (RequestFailure)msg2.payload;
assertEquals(reason1.reason, reason2.reason);
if (version >= VERSION_51)
if (version >= VERSION_60)
{
if (reason1.failure == null)
assertNull(reason2.failure);