From 097f3f1071928df88059a62cd775816098c337c9 Mon Sep 17 00:00:00 2001 From: brfrn169 Date: Tue, 15 Oct 2024 16:58:27 +0900 Subject: [PATCH] Upgrade the version to 3.14.0 --- README.md | 4 +- build.gradle | 2 +- server/conf/database.properties.tmpl | 29 ------ ...nRepairTableIntegrationTestWithServer.java | 99 ------------------- ...nRepairTableIntegrationTestWithServer.java | 82 --------------- 5 files changed, 3 insertions(+), 213 deletions(-) delete mode 100644 server/conf/database.properties.tmpl delete mode 100644 server/src/integration-test/java/com/scalar/db/server/ConsensusCommitAdminRepairTableIntegrationTestWithServer.java delete mode 100644 server/src/integration-test/java/com/scalar/db/server/DistributedStorageAdminRepairTableIntegrationTestWithServer.java diff --git a/README.md b/README.md index 3000dafd0f..f0c057bd1f 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ You can install it in your application using your build tool such as Gradle and To add a dependency on ScalarDB using Gradle, use the following: ```gradle dependencies { - implementation 'com.scalar-labs:scalardb:3.13.0' + implementation 'com.scalar-labs:scalardb:3.14.0' } ``` @@ -19,7 +19,7 @@ To add a dependency using Maven: com.scalar-labs scalardb - 3.13.0 + 3.14.0 ``` diff --git a/build.gradle b/build.gradle index c6a84c7fa4..e786a2811b 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ subprojects { apply plugin: 'com.diffplug.spotless' apply plugin: 'com.scalar.db.jdk-configuration' - project.version = '3.14.0-SNAPSHOT' + project.version = '3.14.0' ext { guiceVersion = '5.1.0' diff --git a/server/conf/database.properties.tmpl b/server/conf/database.properties.tmpl deleted file mode 100644 index db4dcaed07..0000000000 --- a/server/conf/database.properties.tmpl +++ /dev/null @@ -1,29 +0,0 @@ -# Transaction manager implementation. The default is `consensus-commit`. -scalar.db.transaction_manager={{ default .Env.SCALAR_DB_TRANSACTION_MANAGER "" }} - -# Storage implementation used for Consensus Commit. The default is `cassandra`. -scalar.db.storage={{ default .Env.SCALAR_DB_STORAGE "" }} - -# Comma-separated contact points. -scalar.db.contact_points={{ default .Env.SCALAR_DB_CONTACT_POINTS "" }} - -# Port number for all the contact points. -scalar.db.contact_port={{ default .Env.SCALAR_DB_CONTACT_PORT "" }} - -# Credential information to access the database. -scalar.db.username={{ default .Env.SCALAR_DB_USERNAME "" }} -scalar.db.password={{ default .Env.SCALAR_DB_PASSWORD "" }} - -# Isolation level used for Consensus Commit. Either `SNAPSHOT` or `SERIALIZABLE` can be specified. The default is `SNAPSHOT`. -scalar.db.consensus_commit.isolation_level={{ default .Env.SCALAR_DB_CONSENSUSCOMMIT_ISOLATION_LEVEL "" }} - -# For backward compatibility -scalar.db.isolation_level={{ default .Env.SCALAR_DB_ISOLATION_LEVEL "" }} - -# Serializable strategy used for Consensus Commit. -# Either `EXTRA_READ` or `EXTRA_WRITE` can be specified. The default is `EXTRA_READ`. -# If `SNAPSHOT` is specified in the property `scalar.db.consensus_commit.isolation_level`, this is ignored. -scalar.db.consensus_commit.serializable_strategy={{ default .Env.SCALAR_DB_CONSENSUSCOMMIT_SERIALIZABLE_STRATEGY "" }} - -# Port number of ScalarDB Server. The default is `60051`. -scalar.db.server.port={{ default .Env.SCALAR_DB_SERVER_PORT "" }} \ No newline at end of file diff --git a/server/src/integration-test/java/com/scalar/db/server/ConsensusCommitAdminRepairTableIntegrationTestWithServer.java b/server/src/integration-test/java/com/scalar/db/server/ConsensusCommitAdminRepairTableIntegrationTestWithServer.java deleted file mode 100644 index 6e964bcdba..0000000000 --- a/server/src/integration-test/java/com/scalar/db/server/ConsensusCommitAdminRepairTableIntegrationTestWithServer.java +++ /dev/null @@ -1,99 +0,0 @@ -package com.scalar.db.server; - -import com.scalar.db.transaction.consensuscommit.ConsensusCommitAdminRepairTableIntegrationTestBase; -import com.scalar.db.transaction.consensuscommit.ConsensusCommitConfig; -import com.scalar.db.transaction.consensuscommit.Coordinator; -import com.scalar.db.util.AdminTestUtils; -import java.io.IOException; -import java.util.Properties; -import org.junit.jupiter.api.AfterAll; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.DisabledIf; - -public class ConsensusCommitAdminRepairTableIntegrationTestWithServer - extends ConsensusCommitAdminRepairTableIntegrationTestBase { - - private ScalarDbServer server; - boolean isExternalServerUsed; - - @Override - protected void initialize(String testName) throws IOException { - Properties properties = ServerEnv.getServer1Properties(testName); - if (properties != null) { - // Add testName as a coordinator namespace suffix - String coordinatorNamespace = - properties.getProperty( - ConsensusCommitConfig.COORDINATOR_NAMESPACE, Coordinator.NAMESPACE); - properties.setProperty( - ConsensusCommitConfig.COORDINATOR_NAMESPACE, coordinatorNamespace + "_" + testName); - - server = new ScalarDbServer(properties); - server.start(); - } else { - isExternalServerUsed = true; - } - } - - @Override - protected AdminTestUtils getAdminTestUtils(String testName) { - Properties properties = ServerEnv.getServer1Properties(testName); - if (properties == null) { - return null; - } - - // Add testName as a coordinator namespace suffix - String coordinatorNamespace = - properties.getProperty(ConsensusCommitConfig.COORDINATOR_NAMESPACE, Coordinator.NAMESPACE); - properties.setProperty( - ConsensusCommitConfig.COORDINATOR_NAMESPACE, coordinatorNamespace + "_" + testName); - - return new ServerAdminTestUtils(properties); - } - - @AfterAll - @Override - public void afterAll() throws Exception { - super.afterAll(); - if (server != null) { - server.shutdown(); - } - } - - @Override - protected Properties getProps(String testName) { - return ServerEnv.getClient1Properties(testName); - } - - /** This test is disabled if {@link #isExternalServerUsed()} return true */ - @Override - @Test - @DisabledIf("isExternalServerUsed") - public void repairTableAndCoordinatorTable_ForDeletedMetadataTable_ShouldRepairProperly() - throws Exception { - super.repairTableAndCoordinatorTable_ForDeletedMetadataTable_ShouldRepairProperly(); - } - - /** This test is disabled if {@link #isExternalServerUsed()} return true */ - @Override - @Test - @DisabledIf("isExternalServerUsed") - public void repairTableAndCoordinatorTable_ForTruncatedMetadataTable_ShouldRepairProperly() - throws Exception { - super.repairTableAndCoordinatorTable_ForTruncatedMetadataTable_ShouldRepairProperly(); - } - - /** This test is disabled if {@link #isExternalServerUsed()} return true */ - @Override - @Test - @DisabledIf("isExternalServerUsed") - public void repairTable_ForCorruptedMetadataTable_ShouldRepairProperly() throws Exception { - super.repairTable_ForCorruptedMetadataTable_ShouldRepairProperly(); - } - - @SuppressWarnings("unused") - private boolean isExternalServerUsed() { - // An external server is used, so we don't have access to the configuration to connect to the - // underlying storage which makes it impossible to run these tests - return isExternalServerUsed; - } -} diff --git a/server/src/integration-test/java/com/scalar/db/server/DistributedStorageAdminRepairTableIntegrationTestWithServer.java b/server/src/integration-test/java/com/scalar/db/server/DistributedStorageAdminRepairTableIntegrationTestWithServer.java deleted file mode 100644 index 01ccdd2c8b..0000000000 --- a/server/src/integration-test/java/com/scalar/db/server/DistributedStorageAdminRepairTableIntegrationTestWithServer.java +++ /dev/null @@ -1,82 +0,0 @@ -package com.scalar.db.server; - -import com.scalar.db.api.DistributedStorageAdminRepairTableIntegrationTestBase; -import com.scalar.db.util.AdminTestUtils; -import java.io.IOException; -import java.util.Properties; -import org.junit.jupiter.api.AfterAll; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.DisabledIf; - -public class DistributedStorageAdminRepairTableIntegrationTestWithServer - extends DistributedStorageAdminRepairTableIntegrationTestBase { - - private ScalarDbServer server; - private boolean isExternalServerUsed; - - @Override - protected void initialize(String testName) throws IOException { - Properties properties = ServerEnv.getServer1Properties(testName); - if (properties != null) { - server = new ScalarDbServer(properties); - server.start(); - } else { - isExternalServerUsed = true; - } - } - - @Override - protected Properties getProperties(String testName) { - return ServerEnv.getClient1Properties(testName); - } - - @Override - protected AdminTestUtils getAdminTestUtils(String testName) { - Properties properties = ServerEnv.getServer1Properties(testName); - if (properties == null) { - return null; - } - - return new ServerAdminTestUtils(properties); - } - - @Override - @AfterAll - public void afterAll() throws Exception { - super.afterAll(); - if (server != null) { - server.shutdown(); - } - } - - /** This test is disabled if {@link #isExternalServerUsed()} return true */ - @Override - @Test - @DisabledIf("isExternalServerUsed") - public void repairTable_ForDeletedMetadataTable_ShouldRepairProperly() throws Exception { - super.repairTable_ForDeletedMetadataTable_ShouldRepairProperly(); - } - - /** This test is disabled if {@link #isExternalServerUsed()} return true */ - @Override - @Test - @DisabledIf("isExternalServerUsed") - public void repairTable_ForTruncatedMetadataTable_ShouldRepairProperly() throws Exception { - super.repairTable_ForTruncatedMetadataTable_ShouldRepairProperly(); - } - - /** This test is disabled if {@link #isExternalServerUsed()} return true */ - @Override - @Test - @DisabledIf("isExternalServerUsed") - public void repairTable_ForCorruptedMetadataTable_ShouldRepairProperly() throws Exception { - super.repairTable_ForCorruptedMetadataTable_ShouldRepairProperly(); - } - - @SuppressWarnings("unused") - private boolean isExternalServerUsed() { - // An external server is used, so we don't have access to the configuration to connect to the - // underlying storage which makes it impossible to run these tests - return isExternalServerUsed; - } -}