This is an automated email from the ASF dual-hosted git repository.
mck pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git
The following commit(s) were added to refs/heads/trunk by this push:
new 6590cb5aaf Change trunk from 5.1 to 6.0
6590cb5aaf is described below
commit 6590cb5aaf11caaa9965449d2e1921dcc417df7f
Author: mck <[email protected]>
AuthorDate: Sat Mar 21 12:14:38 2026 +0100
Change trunk from 5.1 to 6.0
patch by Mick Semb Wever; reviewed by Dmitry Konstantinov for
CASSANDRA-21243
---
CHANGES.txt | 2 +-
NEWS.txt | 2 +-
README.asc | 2 +-
build.xml | 2 +-
conf/cassandra.yaml | 2 +-
debian/changelog | 2 +-
.../pages/managing/operating/virtualtables.adoc | 2 +-
doc/modules/cassandra/pages/new/index.adoc | 4 ++--
ide/nbproject/project.xml | 2 +-
src/java/org/apache/cassandra/config/Config.java | 4 ++--
.../org/apache/cassandra/db/CounterMutation.java | 6 ++---
src/java/org/apache/cassandra/db/Mutation.java | 12 +++++-----
src/java/org/apache/cassandra/db/ReadCommand.java | 6 ++---
.../org/apache/cassandra/db/SnapshotCommand.java | 6 ++---
.../db/commitlog/CommitLogDescriptor.java | 8 +++----
.../org/apache/cassandra/db/filter/IndexHints.java | 10 ++++-----
.../cassandra/db/partitions/PartitionUpdate.java | 8 +++----
.../cassandra/exceptions/RequestFailure.java | 6 ++---
.../org/apache/cassandra/gms/GossipDigestSyn.java | 6 ++---
.../apache/cassandra/hints/HintsDescriptor.java | 8 +++----
.../apache/cassandra/metrics/ClientMetrics.java | 4 ++--
src/java/org/apache/cassandra/net/Message.java | 22 +++++++++---------
.../org/apache/cassandra/net/MessagingService.java | 10 ++++-----
.../org/apache/cassandra/repair/RepairJobDesc.java | 2 +-
.../cassandra/repair/messages/PrepareMessage.java | 6 ++---
.../repair/messages/ValidationRequest.java | 6 ++---
.../apache/cassandra/schema/DistributedSchema.java | 4 ++--
.../service/accord/serializers/Version.java | 6 ++---
.../cassandra/service/paxos/PaxosPrepare.java | 26 +++++++++++-----------
.../service/paxos/PaxosRepairHistory.java | 6 ++---
.../paxos/cleanup/PaxosStartPrepareCleanup.java | 14 ++++++------
.../apache/cassandra/streaming/StreamSummary.java | 6 ++---
.../cassandra/tcm/log/SystemKeyspaceStorage.java | 2 +-
.../apache/cassandra/tcm/membership/Directory.java | 6 ++---
...rsion=5.1-alpha1.yml => version=6.0-alpha1.yml} | 0
.../cassandra/distributed/impl/InstanceConfig.java | 2 +-
.../ClusterMetadataUpgradeHibernateTest.java | 2 +-
.../ClusterMetadataUpgradeJoinRingTest.java | 2 +-
.../distributed/upgrade/UpgradeTestBase.java | 8 +++----
.../cassandra/AbstractSerializationsTester.java | 2 +-
.../cassandra/config/ConfigCompatibilityTest.java | 4 ++--
.../apache/cassandra/db/filter/IndexHintsTest.java | 10 ++++-----
.../unit/org/apache/cassandra/net/MessageTest.java | 4 ++--
43 files changed, 127 insertions(+), 127 deletions(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index e3e19ffe37..e1c8e3dfe4 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -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)
diff --git a/NEWS.txt b/NEWS.txt
index ef472d409c..f9285ddc3a 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -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
diff --git a/README.asc b/README.asc
index ba1b184b89..35aa0d38f8 100644
--- a/README.asc
+++ b/README.asc
@@ -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>
----
diff --git a/build.xml b/build.xml
index 2d060fb9da..9b108ad47a 100644
--- a/build.xml
+++ b/build.xml
@@ -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"/>
diff --git a/conf/cassandra.yaml b/conf/cassandra.yaml
index 375135bcc1..42935df4d6 100644
--- a/conf/cassandra.yaml
+++ b/conf/cassandra.yaml
@@ -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
diff --git a/debian/changelog b/debian/changelog
index 1287b1cb55..e87bc9bae1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-cassandra (5.1) UNRELEASED; urgency=medium
+cassandra (6.0) UNRELEASED; urgency=medium
* New release
diff --git a/doc/modules/cassandra/pages/managing/operating/virtualtables.adoc
b/doc/modules/cassandra/pages/managing/operating/virtualtables.adoc
index c87699ed77..68aef2e3d5 100644
--- a/doc/modules/cassandra/pages/managing/operating/virtualtables.adoc
+++ b/doc/modules/cassandra/pages/managing/operating/virtualtables.adoc
@@ -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]
diff --git a/doc/modules/cassandra/pages/new/index.adoc
b/doc/modules/cassandra/pages/new/index.adoc
index 015f484f57..c71abf2739 100644
--- a/doc/modules/cassandra/pages/new/index.adoc
+++ b/doc/modules/cassandra/pages/new/index.adoc
@@ -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]
diff --git a/ide/nbproject/project.xml b/ide/nbproject/project.xml
index aff969f0f1..531c971855 100644
--- a/ide/nbproject/project.xml
+++ b/ide/nbproject/project.xml
@@ -8,7 +8,7 @@
<property name="project.dir">..</property>
<!-- the compile classpaths should be distinct per compilation
unit… but it is kept simple and the build will catch errors -->
<!-- DO NOT EDIT THE FOLLOWING LINE DIRECTLY: Use the
update-netbeans-classpath.sh script -->
- <property
name="cassandra.classpath.jars">${project.dir}/build/lib/jars/AmazonCorrettoCryptoProvider-2.2.0-linux-aarch_64.jar:${project.dir}/build/lib/jars/HdrHistogram-2.1.12.jar:${project.dir}/build/lib/jars/ST4-4.0.8.jar:${project.dir}/build/lib/jars/affinity-3.23.3.jar:${project.dir}/build/lib/jars/agrona-1.17.1.jar:${project.dir}/build/lib/jars/antlr-3.5.2.jar:${project.dir}/build/lib/jars/antlr-runtime-3.5.2.jar:${project.dir}/build/lib/jars/asm-9.4.jar:${project.di
[...]
+ <property
name="cassandra.classpath.jars">${project.dir}/build/lib/jars/affinity-3.23.3.jar:${project.dir}/build/lib/jars/agrona-1.17.1.jar:${project.dir}/build/lib/jars/AmazonCorrettoCryptoProvider-2.2.0-linux-aarch_64.jar:${project.dir}/build/lib/jars/antlr-3.5.2.jar:${project.dir}/build/lib/jars/antlr-runtime-3.5.2.jar:${project.dir}/build/lib/jars/asm-9.5.jar:${project.dir}/build/lib/jars/async-profiler-4.2.jar:${project.dir}/build/lib/jars/big-math-2.3.0.jar:${projec
[...]
</properties>
<folders>
<source-folder>
diff --git a/src/java/org/apache/cassandra/config/Config.java
b/src/java/org/apache/cassandra/config/Config.java
index 0ac9c691a0..c777d0fc89 100644
--- a/src/java/org/apache/cassandra/config/Config.java
+++ b/src/java/org/apache/cassandra/config/Config.java
@@ -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";
diff --git a/src/java/org/apache/cassandra/db/CounterMutation.java
b/src/java/org/apache/cassandra/db/CounterMutation.java
index 6e94b038cc..52068473e5 100644
--- a/src/java/org/apache/cassandra/db/CounterMutation.java
+++ b/src/java/org/apache/cassandra/db/CounterMutation.java
@@ -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);
diff --git a/src/java/org/apache/cassandra/db/Mutation.java
b/src/java/org/apache/cassandra/db/Mutation.java
index 83036bee1d..9fc49ae15e 100644
--- a/src/java/org/apache/cassandra/db/Mutation.java
+++ b/src/java/org/apache/cassandra/db/Mutation.java
@@ -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())
diff --git a/src/java/org/apache/cassandra/db/ReadCommand.java
b/src/java/org/apache/cassandra/db/ReadCommand.java
index 91233572b5..f5f9105602 100644
--- a/src/java/org/apache/cassandra/db/ReadCommand.java
+++ b/src/java/org/apache/cassandra/db/ReadCommand.java
@@ -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)
diff --git a/src/java/org/apache/cassandra/db/SnapshotCommand.java
b/src/java/org/apache/cassandra/db/SnapshotCommand.java
index a5e522abff..6bc8f08ceb 100644
--- a/src/java/org/apache/cassandra/db/SnapshotCommand.java
+++ b/src/java/org/apache/cassandra/db/SnapshotCommand.java
@@ -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)
diff --git
a/src/java/org/apache/cassandra/db/commitlog/CommitLogDescriptor.java
b/src/java/org/apache/cassandra/db/commitlog/CommitLogDescriptor.java
index 82d8eb08df..c7d3d3f16c 100644
--- a/src/java/org/apache/cassandra/db/commitlog/CommitLogDescriptor.java
+++ b/src/java/org/apache/cassandra/db/commitlog/CommitLogDescriptor.java
@@ -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);
}
diff --git a/src/java/org/apache/cassandra/db/filter/IndexHints.java
b/src/java/org/apache/cassandra/db/filter/IndexHints.java
index 7deb84b001..3a39873800 100644
--- a/src/java/org/apache/cassandra/db/filter/IndexHints.java
+++ b/src/java/org/apache/cassandra/db/filter/IndexHints.java
@@ -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
diff --git a/src/java/org/apache/cassandra/db/partitions/PartitionUpdate.java
b/src/java/org/apache/cassandra/db/partitions/PartitionUpdate.java
index 120bfc553a..723c773920 100644
--- a/src/java/org/apache/cassandra/db/partitions/PartitionUpdate.java
+++ b/src/java/org/apache/cassandra/db/partitions/PartitionUpdate.java
@@ -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());
}
}
diff --git a/src/java/org/apache/cassandra/exceptions/RequestFailure.java
b/src/java/org/apache/cassandra/exceptions/RequestFailure.java
index 8efba5a2e3..4990c25973 100644
--- a/src/java/org/apache/cassandra/exceptions/RequestFailure.java
+++ b/src/java/org/apache/cassandra/exceptions/RequestFailure.java
@@ -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;
}
diff --git a/src/java/org/apache/cassandra/gms/GossipDigestSyn.java
b/src/java/org/apache/cassandra/gms/GossipDigestSyn.java
index b93fa25ca7..82cbc61de7 100644
--- a/src/java/org/apache/cassandra/gms/GossipDigestSyn.java
+++ b/src/java/org/apache/cassandra/gms/GossipDigestSyn.java
@@ -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;
diff --git a/src/java/org/apache/cassandra/hints/HintsDescriptor.java
b/src/java/org/apache/cassandra/hints/HintsDescriptor.java
index 0f85c6101e..5b8db34035 100644
--- a/src/java/org/apache/cassandra/hints/HintsDescriptor.java
+++ b/src/java/org/apache/cassandra/hints/HintsDescriptor.java
@@ -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();
}
diff --git a/src/java/org/apache/cassandra/metrics/ClientMetrics.java
b/src/java/org/apache/cassandra/metrics/ClientMetrics.java
index 25f6c2a51c..3ca4885a5d 100644
--- a/src/java/org/apache/cassandra/metrics/ClientMetrics.java
+++ b/src/java/org/apache/cassandra/metrics/ClientMetrics.java
@@ -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);
diff --git a/src/java/org/apache/cassandra/net/Message.java
b/src/java/org/apache/cassandra/net/Message.java
index ba334261a6..98ecca9ef5 100644
--- a/src/java/org/apache/cassandra/net/Message.java
+++ b/src/java/org/apache/cassandra/net/Message.java
@@ -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:
diff --git a/src/java/org/apache/cassandra/net/MessagingService.java
b/src/java/org/apache/cassandra/net/MessagingService.java
index 0e9e6eb9ab..f7208f694e 100644
--- a/src/java/org/apache/cassandra/net/MessagingService.java
+++ b/src/java/org/apache/cassandra/net/MessagingService.java
@@ -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
diff --git a/src/java/org/apache/cassandra/repair/RepairJobDesc.java
b/src/java/org/apache/cassandra/repair/RepairJobDesc.java
index 360d0429e1..386c600edc 100644
--- a/src/java/org/apache/cassandra/repair/RepairJobDesc.java
+++ b/src/java/org/apache/cassandra/repair/RepairJobDesc.java
@@ -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();
diff --git a/src/java/org/apache/cassandra/repair/messages/PrepareMessage.java
b/src/java/org/apache/cassandra/repair/messages/PrepareMessage.java
index 81ae098349..db33726719 100644
--- a/src/java/org/apache/cassandra/repair/messages/PrepareMessage.java
+++ b/src/java/org/apache/cassandra/repair/messages/PrepareMessage.java
@@ -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)
diff --git
a/src/java/org/apache/cassandra/repair/messages/ValidationRequest.java
b/src/java/org/apache/cassandra/repair/messages/ValidationRequest.java
index 5c6550fac7..12dd8e8cc7 100644
--- a/src/java/org/apache/cassandra/repair/messages/ValidationRequest.java
+++ b/src/java/org/apache/cassandra/repair/messages/ValidationRequest.java
@@ -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;
}
};
diff --git a/src/java/org/apache/cassandra/schema/DistributedSchema.java
b/src/java/org/apache/cassandra/schema/DistributedSchema.java
index 7abcc360a3..763632fd66 100644
--- a/src/java/org/apache/cassandra/schema/DistributedSchema.java
+++ b/src/java/org/apache/cassandra/schema/DistributedSchema.java
@@ -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
diff --git
a/src/java/org/apache/cassandra/service/accord/serializers/Version.java
b/src/java/org/apache/cassandra/service/accord/serializers/Version.java
index 45dfa09412..de8d06a681 100644
--- a/src/java/org/apache/cassandra/service/accord/serializers/Version.java
+++ b/src/java/org/apache/cassandra/service/accord/serializers/Version.java
@@ -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;
diff --git a/src/java/org/apache/cassandra/service/paxos/PaxosPrepare.java
b/src/java/org/apache/cassandra/service/paxos/PaxosPrepare.java
index f1c2f3fdd7..f7304ba49e 100644
--- a/src/java/org/apache/cassandra/service/paxos/PaxosPrepare.java
+++ b/src/java/org/apache/cassandra/service/paxos/PaxosPrepare.java
@@ -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);
}
diff --git
a/src/java/org/apache/cassandra/service/paxos/PaxosRepairHistory.java
b/src/java/org/apache/cassandra/service/paxos/PaxosRepairHistory.java
index 811d4b48f7..834e6db20d 100644
--- a/src/java/org/apache/cassandra/service/paxos/PaxosRepairHistory.java
+++ b/src/java/org/apache/cassandra/service/paxos/PaxosRepairHistory.java
@@ -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)
diff --git
a/src/java/org/apache/cassandra/service/paxos/cleanup/PaxosStartPrepareCleanup.java
b/src/java/org/apache/cassandra/service/paxos/cleanup/PaxosStartPrepareCleanup.java
index 671398dd9c..e195901ece 100644
---
a/src/java/org/apache/cassandra/service/paxos/cleanup/PaxosStartPrepareCleanup.java
+++
b/src/java/org/apache/cassandra/service/paxos/cleanup/PaxosStartPrepareCleanup.java
@@ -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);
diff --git a/src/java/org/apache/cassandra/streaming/StreamSummary.java
b/src/java/org/apache/cassandra/streaming/StreamSummary.java
index 7a0dd9c401..2c2b2de55e 100644
--- a/src/java/org/apache/cassandra/streaming/StreamSummary.java
+++ b/src/java/org/apache/cassandra/streaming/StreamSummary.java
@@ -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;
}
diff --git a/src/java/org/apache/cassandra/tcm/log/SystemKeyspaceStorage.java
b/src/java/org/apache/cassandra/tcm/log/SystemKeyspaceStorage.java
index d1c4e8e57c..fa259496c7 100644
--- a/src/java/org/apache/cassandra/tcm/log/SystemKeyspaceStorage.java
+++ b/src/java/org/apache/cassandra/tcm/log/SystemKeyspaceStorage.java
@@ -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;
diff --git a/src/java/org/apache/cassandra/tcm/membership/Directory.java
b/src/java/org/apache/cassandra/tcm/membership/Directory.java
index c0c4d7a4df..8c7942a1fd 100644
--- a/src/java/org/apache/cassandra/tcm/membership/Directory.java
+++ b/src/java/org/apache/cassandra/tcm/membership/Directory.java
@@ -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;
}
}
diff --git a/test/data/config/version=5.1-alpha1.yml
b/test/data/config/version=6.0-alpha1.yml
similarity index 100%
rename from test/data/config/version=5.1-alpha1.yml
rename to test/data/config/version=6.0-alpha1.yml
diff --git
a/test/distributed/org/apache/cassandra/distributed/impl/InstanceConfig.java
b/test/distributed/org/apache/cassandra/distributed/impl/InstanceConfig.java
index 9c8065e6e4..e16320823e 100644
--- a/test/distributed/org/apache/cassandra/distributed/impl/InstanceConfig.java
+++ b/test/distributed/org/apache/cassandra/distributed/impl/InstanceConfig.java
@@ -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);
diff --git
a/test/distributed/org/apache/cassandra/distributed/upgrade/ClusterMetadataUpgradeHibernateTest.java
b/test/distributed/org/apache/cassandra/distributed/upgrade/ClusterMetadataUpgradeHibernateTest.java
index 35c108193a..a19978dd52 100644
---
a/test/distributed/org/apache/cassandra/distributed/upgrade/ClusterMetadataUpgradeHibernateTest.java
+++
b/test/distributed/org/apache/cassandra/distributed/upgrade/ClusterMetadataUpgradeHibernateTest.java
@@ -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));
diff --git
a/test/distributed/org/apache/cassandra/distributed/upgrade/ClusterMetadataUpgradeJoinRingTest.java
b/test/distributed/org/apache/cassandra/distributed/upgrade/ClusterMetadataUpgradeJoinRingTest.java
index 76a9696cb5..33e5132888 100644
---
a/test/distributed/org/apache/cassandra/distributed/upgrade/ClusterMetadataUpgradeJoinRingTest.java
+++
b/test/distributed/org/apache/cassandra/distributed/upgrade/ClusterMetadataUpgradeJoinRingTest.java
@@ -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);
diff --git
a/test/distributed/org/apache/cassandra/distributed/upgrade/UpgradeTestBase.java
b/test/distributed/org/apache/cassandra/distributed/upgrade/UpgradeTestBase.java
index f7e4f8a5d7..7fb41b843f 100644
---
a/test/distributed/org/apache/cassandra/distributed/upgrade/UpgradeTestBase.java
+++
b/test/distributed/org/apache/cassandra/distributed/upgrade/UpgradeTestBase.java
@@ -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
diff --git a/test/unit/org/apache/cassandra/AbstractSerializationsTester.java
b/test/unit/org/apache/cassandra/AbstractSerializationsTester.java
index 171507a973..2509f7e83a 100644
--- a/test/unit/org/apache/cassandra/AbstractSerializationsTester.java
+++ b/test/unit/org/apache/cassandra/AbstractSerializationsTester.java
@@ -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();
diff --git a/test/unit/org/apache/cassandra/config/ConfigCompatibilityTest.java
b/test/unit/org/apache/cassandra/config/ConfigCompatibilityTest.java
index eb249da15e..e8794092d4 100644
--- a/test/unit/org/apache/cassandra/config/ConfigCompatibilityTest.java
+++ b/test/unit/org/apache/cassandra/config/ConfigCompatibilityTest.java
@@ -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());
}
diff --git a/test/unit/org/apache/cassandra/db/filter/IndexHintsTest.java
b/test/unit/org/apache/cassandra/db/filter/IndexHintsTest.java
index 95d793acef..4a8a2c2848 100644
--- a/test/unit/org/apache/cassandra/db/filter/IndexHintsTest.java
+++ b/test/unit/org/apache/cassandra/db/filter/IndexHintsTest.java
@@ -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());
}
diff --git a/test/unit/org/apache/cassandra/net/MessageTest.java
b/test/unit/org/apache/cassandra/net/MessageTest.java
index 15d062e1a7..1455cdf0c9 100644
--- a/test/unit/org/apache/cassandra/net/MessageTest.java
+++ b/test/unit/org/apache/cassandra/net/MessageTest.java
@@ -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);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]