mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-6.0' into trunk
This commit is contained in:
commit
a434c91c56
|
|
@ -3,6 +3,7 @@
|
||||||
* Allow nodetool garbagecollect to take a user defined list of SSTables (CASSANDRA-16767)
|
* Allow nodetool garbagecollect to take a user defined list of SSTables (CASSANDRA-16767)
|
||||||
* Add a guardrail for misprepared statements (CASSANDRA-21139)
|
* Add a guardrail for misprepared statements (CASSANDRA-21139)
|
||||||
Merged from 6.0:
|
Merged from 6.0:
|
||||||
|
* Allocation improvements in ProtocolVersion, StorageProxy and MerkleTree (CASSANDRA-21199)
|
||||||
* Don’t leave autocompaction disabled during bootstrap and replace (CASSANDRA-21236)
|
* Don’t leave autocompaction disabled during bootstrap and replace (CASSANDRA-21236)
|
||||||
* Make nodetool abortbootstrap more robust (CASSANDRA-21235)
|
* Make nodetool abortbootstrap more robust (CASSANDRA-21235)
|
||||||
* Don't clear prepared statement cache on nodetool cms initialize (CASSANDRA-21234)
|
* Don't clear prepared statement cache on nodetool cms initialize (CASSANDRA-21234)
|
||||||
|
|
|
||||||
|
|
@ -1441,8 +1441,11 @@ public class StorageProxy implements StorageProxyMBean
|
||||||
boolean attributeNonAccordLatency = true;
|
boolean attributeNonAccordLatency = true;
|
||||||
long nonAccordEndTime = -1;
|
long nonAccordEndTime = -1;
|
||||||
|
|
||||||
if (mutations.stream().anyMatch(mutation -> Keyspace.open(mutation.getKeyspaceName()).getReplicationStrategy().hasTransientReplicas()))
|
for (IMutation mutation : mutations)
|
||||||
throw new AssertionError("Logged batches are unsupported with transient replication");
|
{
|
||||||
|
if (Keyspace.open(mutation.getKeyspaceName()).getReplicationStrategy().hasTransientReplicas())
|
||||||
|
throw new AssertionError("Logged batches are unsupported with transient replication");
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,8 @@ import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
|
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
|
|
||||||
import org.apache.cassandra.cql3.FunctionContext;
|
import org.apache.cassandra.cql3.FunctionContext;
|
||||||
|
|
@ -73,6 +75,7 @@ public enum ProtocolVersion implements Comparable<ProtocolVersion>, FunctionCont
|
||||||
|
|
||||||
/** All supported versions, published as an enumset */
|
/** All supported versions, published as an enumset */
|
||||||
public final static EnumSet<ProtocolVersion> SUPPORTED = EnumSet.copyOf(Arrays.asList(ArrayUtils.addAll(SUPPORTED_VERSIONS)));
|
public final static EnumSet<ProtocolVersion> SUPPORTED = EnumSet.copyOf(Arrays.asList(ArrayUtils.addAll(SUPPORTED_VERSIONS)));
|
||||||
|
private final static ImmutableList<String> SUPPORTED_VERSION_STRINGS = SUPPORTED.stream().map(ProtocolVersion::toString).collect(ImmutableList.toImmutableList());
|
||||||
|
|
||||||
/** Old unsupported versions, this is OK as long as we never add newer unsupported versions */
|
/** Old unsupported versions, this is OK as long as we never add newer unsupported versions */
|
||||||
public final static EnumSet<ProtocolVersion> UNSUPPORTED = EnumSet.complementOf(SUPPORTED);
|
public final static EnumSet<ProtocolVersion> UNSUPPORTED = EnumSet.complementOf(SUPPORTED);
|
||||||
|
|
@ -84,12 +87,9 @@ public enum ProtocolVersion implements Comparable<ProtocolVersion>, FunctionCont
|
||||||
public final static ProtocolVersion CURRENT = V5;
|
public final static ProtocolVersion CURRENT = V5;
|
||||||
public final static Optional<ProtocolVersion> BETA = Optional.of(V6);
|
public final static Optional<ProtocolVersion> BETA = Optional.of(V6);
|
||||||
|
|
||||||
public static List<String> supportedVersions()
|
public static ImmutableList<String> supportedVersions()
|
||||||
{
|
{
|
||||||
List<String> ret = new ArrayList<>(SUPPORTED.size());
|
return SUPPORTED_VERSION_STRINGS;
|
||||||
for (ProtocolVersion version : SUPPORTED)
|
|
||||||
ret.add(version.toString());
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<ProtocolVersion> supportedVersionsStartingWith(ProtocolVersion smallestVersion)
|
public static List<ProtocolVersion> supportedVersionsStartingWith(ProtocolVersion smallestVersion)
|
||||||
|
|
|
||||||
|
|
@ -1482,7 +1482,7 @@ public class MerkleTree
|
||||||
{
|
{
|
||||||
assert left.length == right.length;
|
assert left.length == right.length;
|
||||||
|
|
||||||
byte[] out = Arrays.copyOf(right, right.length);
|
byte[] out = new byte[right.length];
|
||||||
for (int i = 0; i < left.length; i++)
|
for (int i = 0; i < left.length; i++)
|
||||||
out[i] = (byte)((left[i] & 0xFF) ^ (right[i] & 0xFF));
|
out[i] = (byte)((left[i] & 0xFF) ^ (right[i] & 0xFF));
|
||||||
return out;
|
return out;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue