Skip to content

Commit

Permalink
another try
Browse files Browse the repository at this point in the history
  • Loading branch information
dlg99 committed Jun 18, 2024
1 parent 9c6d39e commit a60cccf
Showing 1 changed file with 20 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package org.apache.bookkeeper.tests.backwardcompat

import com.github.dockerjava.api.DockerClient
import com.google.common.collect.Lists
import org.apache.bookkeeper.tests.integration.utils.BookKeeperClusterUtils
import org.apache.bookkeeper.tests.integration.utils.MavenClassLoader
import org.jboss.arquillian.junit.Arquillian
Expand Down Expand Up @@ -62,17 +63,31 @@ class TestCompatUpgradeDowngrade {

LOG.info("Setting ledger storage")

for (String version: BookKeeperClusterUtils.OLD_CLIENT_VERSIONS) {
List<String> versions = Lists.newArrayList(BookKeeperClusterUtils.OLD_CLIENT_VERSIONS)
versions.add(BookKeeperClusterUtils.CURRENT_VERSION)

for (String version: versions) {
BookKeeperClusterUtils.appendToAllBookieConf(docker, version,
"ledgerStorageClass",
"org.apache.bookkeeper.bookie.storage.ldb.DbLedgerStorage")

try {
BookKeeperClusterUtils.appendToAllBookieConf(docker, version,
"dbStorage_rocksDB_format_version",
"2")
BookKeeperClusterUtils.appendToAllBookieConf(docker, version,
"dbStorage_rocksDB_checksum_type",
"kCRC32c")
BookKeeperClusterUtils.appendToAllBookieConf(docker, version,
"conf/default_rocksdb.conf.default",
"format_version",
"2")
} catch (Exception e) {
LOG.warn(version + ": Failed to set rocksdb configs, might be ok for some older version", e)
}
}
BookKeeperClusterUtils.appendToAllBookieConf(docker, BookKeeperClusterUtils.CURRENT_VERSION,
"ledgerStorageClass",
"org.apache.bookkeeper.bookie.storage.ldb.DbLedgerStorage")
}


// will ignore older non-supported versions

@Test
Expand Down Expand Up @@ -103,16 +118,6 @@ class TestCompatUpgradeDowngrade {
@Test
public void upgradeDowngrade_015() {
String currentVersion = BookKeeperClusterUtils.CURRENT_VERSION
BookKeeperClusterUtils.appendToAllBookieConf(docker, currentVersion,
"dbStorage_rocksDB_format_version",
"2")
BookKeeperClusterUtils.appendToAllBookieConf(docker, currentVersion,
"dbStorage_rocksDB_checksum_type",
"kCRC32c")
BookKeeperClusterUtils.appendToAllBookieConf(docker, currentVersion,
"conf/default_rocksdb.conf.default",
"format_version",
"2")
upgradeDowngrade("4.17.0", currentVersion)
}

Expand Down

0 comments on commit a60cccf

Please sign in to comment.