Merge branch 'cassandra-5.0' into trunk

* cassandra-5.0:
  Update trunk to version 5.1
This commit is contained in:
Mick Semb Wever 2023-08-14 14:25:26 +02:00
commit d3a7387836
No known key found for this signature in database
GPG Key ID: E91335D77E3E87CB
12 changed files with 53 additions and 34 deletions

View File

@ -74,16 +74,31 @@ _timeout_for() {
}
_build_all_dtest_jars() {
pushd $TMP_DIR >/dev/null
rm -fR ${TMP_DIR}/cassandra-dtest-jars
until git clone --quiet --depth 1 --no-single-branch https://github.com/apache/cassandra.git cassandra-dtest-jars ; do echo "git clone failed… trying again… " ; done
# build the dtest-jar for the branch under test. remember to `ant clean` if you want a new dtest jar built
dtest_jar_version=$(grep 'property\s*name=\"base.version\"' build.xml |sed -ne 's/.*value=\"\([^"]*\)\".*/\1/p')
if [ -f "${DIST_DIR}/dtest-${dtest_jar_version}.jar" ] ; then
echo "Skipping dtest jar build for branch under test as ${DIST_DIR}/dtest-${dtest_jar_version}.jar already exists"
else
ant jar dtest-jar ${ANT_TEST_OPTS} -Dbuild.dir=${TMP_DIR}/cassandra-dtest-jars/build
cp "${TMP_DIR}/cassandra-dtest-jars/build/dtest-${dtest_jar_version}.jar" ${DIST_DIR}/
fi
if [ -d ${TMP_DIR}/cassandra-dtest-jars ] && [ "https://github.com/apache/cassandra.git" == "$(git -C ${TMP_DIR}/cassandra-dtest-jars remote get-url origin)" ] ; then
until git -C ${TMP_DIR}/cassandra-dtest-jars fetch --quiet origin ; do echo "git pull failed… trying again… " ; done
else
rm -fR ${TMP_DIR}/cassandra-dtest-jars
pushd $TMP_DIR >/dev/null
until git clone --quiet --depth 1 --no-single-branch https://github.com/apache/cassandra.git cassandra-dtest-jars ; do echo "git clone failed… trying again… " ; done
popd >/dev/null
fi
# cassandra-4 branches need CASSANDRA_USE_JDK11 to allow jdk11
[ "${java_version}" -eq 11 ] && export CASSANDRA_USE_JDK11=true
pushd ${TMP_DIR}/cassandra-dtest-jars >/dev/null
for branch in cassandra-4.0 cassandra-4.1 trunk ; do
git checkout $branch
for branch in cassandra-4.0 cassandra-4.1 cassandra-5.0 trunk ; do
git checkout --quiet $branch
dtest_jar_version=$(grep 'property\s*name=\"base.version\"' build.xml |sed -ne 's/.*value=\"\([^"]*\)\".*/\1/p')
if [ -f "${DIST_DIR}/dtest-${dtest_jar_version}.jar" ] ; then
echo "Skipping dtest jar build for branch ${branch} as ${DIST_DIR}/dtest-${dtest_jar_version}.jar already exists"
@ -95,7 +110,6 @@ _build_all_dtest_jars() {
cp "${TMP_DIR}/cassandra-dtest-jars/build/dtest-${dtest_jar_version}.jar" ${DIST_DIR}/
done
popd >/dev/null
popd >/dev/null
ls -l ${DIST_DIR}/dtest*.jar
unset CASSANDRA_USE_JDK11
}

View File

@ -5070,7 +5070,7 @@ jobs:
cd ~/cassandra
mkdir ~/dtest_jars
git remote add apache https://github.com/apache/cassandra.git
for branch in cassandra-4.0 cassandra-4.1 trunk; do
for branch in cassandra-4.0 cassandra-4.1 cassandra-5.0 trunk; do
# check out the correct cassandra version:
git remote set-branches --add apache '$branch'
git fetch --depth 1 apache $branch

View File

@ -5070,7 +5070,7 @@ jobs:
cd ~/cassandra
mkdir ~/dtest_jars
git remote add apache https://github.com/apache/cassandra.git
for branch in cassandra-4.0 cassandra-4.1 trunk; do
for branch in cassandra-4.0 cassandra-4.1 cassandra-5.0 trunk; do
# check out the correct cassandra version:
git remote set-branches --add apache '$branch'
git fetch --depth 1 apache $branch

View File

@ -5070,7 +5070,7 @@ jobs:
cd ~/cassandra
mkdir ~/dtest_jars
git remote add apache https://github.com/apache/cassandra.git
for branch in cassandra-4.0 cassandra-4.1 trunk; do
for branch in cassandra-4.0 cassandra-4.1 cassandra-5.0 trunk; do
# check out the correct cassandra version:
git remote set-branches --add apache '$branch'
git fetch --depth 1 apache $branch

View File

@ -2901,7 +2901,7 @@ commands:
cd ~/cassandra
mkdir ~/dtest_jars
git remote add apache https://github.com/apache/cassandra.git
for branch in cassandra-4.0 cassandra-4.1 trunk; do
for branch in cassandra-4.0 cassandra-4.1 cassandra-5.0 trunk; do
# check out the correct cassandra version:
git remote set-branches --add apache '$branch'
git fetch --depth 1 apache $branch

View File

@ -66,6 +66,19 @@ restore snapshots created with the previous major version using the
using the provided 'sstableupgrade' tool.
5.1
===
New features
------------
Upgrading
---------
Deprecation
-----------
5.0
===

View File

@ -32,7 +32,7 @@
<property name="debuglevel" value="source,lines,vars"/>
<!-- default version and SCM information -->
<property name="base.version" value="5.0"/>
<property name="base.version" value="5.1"/>
<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;a=tree"/>

2
debian/changelog vendored
View File

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

View File

@ -19,36 +19,18 @@
package org.apache.cassandra.distributed.upgrade;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Lists;
import org.junit.Test;
import com.vdurmont.semver4j.Semver;
import org.apache.cassandra.db.compaction.OperationType;
import org.apache.cassandra.distributed.api.ConsistencyLevel;
import org.apache.cassandra.tools.ToolRunner;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameter;
import org.junit.runners.Parameterized.Parameters;
import java.util.ArrayList;
import static org.apache.cassandra.db.compaction.CompactionHistoryTabularData.COMPACTION_TYPE_PROPERTY;
import static org.apache.cassandra.tools.ToolRunner.invokeNodetoolJvmDtest;
import static org.apache.cassandra.tools.nodetool.CompactionHistoryTest.assertCompactionHistoryOutPut;
@RunWith(Parameterized.class)
public class CompactionHistorySystemTableUpgradeTest extends UpgradeTestBase
{
@Parameter
public Semver version;
@Parameters()
public static ArrayList<Semver> versions()
{
return Lists.newArrayList(v30, v3X, v40, v41);
}
@Test
public void compactionHistorySystemTableTest() throws Throwable
@ -56,7 +38,9 @@ public class CompactionHistorySystemTableUpgradeTest extends UpgradeTestBase
new TestCase()
.nodes(1)
.nodesToUpgrade(1)
.upgradesToCurrentFrom(version)
// all upgrades from v40 to current, excluding v50 -> v51
.singleUpgradeToCurrentFrom(v40)
.singleUpgradeToCurrentFrom(v41)
.setup((cluster) -> {
//create table
cluster.schemaChange("CREATE TABLE " + KEYSPACE + ".tb (" +

View File

@ -119,7 +119,9 @@ public class MixedModeTTLOverflowUpgradeTest extends UpgradeTestBase
new TestCase()
.nodes(2)
.nodesToUpgradeOrdered(1, 2)
.upgradesToCurrentFrom(v40)
// all upgrades from v40 to current, excluding v50 -> v51
.singleUpgradeToCurrentFrom(v40)
.singleUpgradeToCurrentFrom(v41)
.setup(cluster -> {
cluster.schemaChange(withKeyspace("CREATE TABLE %s.t (k int PRIMARY KEY, v int)"));

View File

@ -45,7 +45,9 @@ public class MixedModeWritetimeOrTTLTest extends UpgradeTestBase
new TestCase()
.nodes(2)
.nodesToUpgradeOrdered(1, 2)
.upgradesToCurrentFrom(v30)
// all upgrades from v40 to current, excluding v50 -> v51
.singleUpgradeToCurrentFrom(v40)
.singleUpgradeToCurrentFrom(v41)
.setup(cluster -> {
ICoordinator coordinator = cluster.coordinator(1);

View File

@ -92,6 +92,7 @@ public class UpgradeTestBase extends DistributedTestBase
public static final Semver v40 = new Semver("4.0-alpha1", SemverType.LOOSE);
public static final Semver v41 = new Semver("4.1-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);
protected static final SimpleGraph<Semver> SUPPORTED_UPGRADE_PATHS = new SimpleGraph.Builder<Semver>()
.addEdge(v30, v3X)
@ -101,7 +102,10 @@ public class UpgradeTestBase extends DistributedTestBase
.addEdge(v3X, v41)
.addEdge(v40, v41)
.addEdge(v40, v50)
.addEdge(v40, v51)
.addEdge(v41, v50)
.addEdge(v41, v51)
.addEdge(v50, v51)
.build();
// the last is always the current