Skip to content

Commit 2122f1b

Browse files
authored
Merge branch 'master' into support-begin-in-read-only-mode
2 parents 33b86d2 + ec595ae commit 2122f1b

File tree

10 files changed

+714
-220
lines changed

10 files changed

+714
-220
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ subprojects {
2525
guavaVersion = '32.1.3-jre'
2626
slf4jVersion = '1.7.36'
2727
cassandraDriverVersion = '3.11.5'
28-
azureCosmosVersion = '4.70.0'
28+
azureCosmosVersion = '4.71.0'
2929
jooqVersion = '3.14.16'
3030
awssdkVersion = '2.31.3'
3131
commonsDbcp2Version = '2.13.0'
3232
mysqlDriverVersion = '8.4.0'
3333
postgresqlDriverVersion = '42.7.6'
3434
oracleDriverVersion = '23.8.0.25.04'
3535
sqlserverDriverVersion = '12.8.1.jre8'
36-
sqliteDriverVersion = '3.49.1.0'
36+
sqliteDriverVersion = '3.50.1.0'
3737
yugabyteDriverVersion = '42.7.3-yb-4'
3838
db2DriverVersion= '12.1.0.0'
3939
mariadDbDriverVersion = '3.5.3'

core/src/main/java/com/scalar/db/api/ReplicationAdmin.java

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import com.scalar.db.common.error.CoreError;
44
import com.scalar.db.exception.storage.ExecutionException;
5-
import java.util.Collections;
65
import java.util.Map;
76

87
/** An administrative interface for the replication feature. */
@@ -31,10 +30,7 @@ default void createReplicationTables(Map<String, String> options) throws Executi
3130
*/
3231
default void createReplicationTables(boolean ifNotExist, Map<String, String> options)
3332
throws ExecutionException {
34-
if (ifNotExist && replicationTablesExist()) {
35-
return;
36-
}
37-
createReplicationTables(options);
33+
throw new UnsupportedOperationException(CoreError.REPLICATION_NOT_ENABLED.buildMessage());
3834
}
3935

4036
/**
@@ -48,10 +44,7 @@ default void createReplicationTables(boolean ifNotExist, Map<String, String> opt
4844
* @throws ExecutionException if the operation fails
4945
*/
5046
default void createReplicationTables(boolean ifNotExist) throws ExecutionException {
51-
if (ifNotExist && replicationTablesExist()) {
52-
return;
53-
}
54-
createReplicationTables(Collections.emptyMap());
47+
throw new UnsupportedOperationException(CoreError.REPLICATION_NOT_ENABLED.buildMessage());
5548
}
5649

5750
/**
@@ -60,7 +53,7 @@ default void createReplicationTables(boolean ifNotExist) throws ExecutionExcepti
6053
* @throws ExecutionException if the operation fails
6154
*/
6255
default void createReplicationTables() throws ExecutionException {
63-
createReplicationTables(Collections.emptyMap());
56+
throw new UnsupportedOperationException(CoreError.REPLICATION_NOT_ENABLED.buildMessage());
6457
}
6558

6659
/**
@@ -83,10 +76,7 @@ default void dropReplicationTables() throws ExecutionException {
8376
* @throws ExecutionException if the operation fails
8477
*/
8578
default void dropReplicationTables(boolean ifExist) throws ExecutionException {
86-
if (ifExist && !replicationTablesExist()) {
87-
return;
88-
}
89-
dropReplicationTables();
79+
throw new UnsupportedOperationException(CoreError.REPLICATION_NOT_ENABLED.buildMessage());
9080
}
9181

9282
/**

core/src/main/java/com/scalar/db/common/error/CoreError.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -861,8 +861,7 @@ public enum CoreError implements ScalarDbError {
861861
REPLICATION_NOT_ENABLED(
862862
Category.USER_ERROR,
863863
"0188",
864-
// TODO: Update the message once the licence type is determined.
865-
"The replication feature is not enabled. To use this feature, you must enable it",
864+
"The replication feature is not enabled. To use this feature, you must enable it. Note that this feature is supported only in the ScalarDB Enterprise edition",
866865
"",
867866
""),
868867
DATA_LOADER_IMPORT_TARGET_MISSING(

schema-loader/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ dependencies {
1919
implementation "com.google.code.gson:gson:${gsonVersion}"
2020
implementation "info.picocli:picocli:${picocliVersion}"
2121
testImplementation "org.junit.jupiter:junit-jupiter-api:${junitVersion}"
22+
testImplementation "org.junit.jupiter:junit-jupiter-params:${junitVersion}"
2223
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junitVersion}"
2324
testImplementation "org.assertj:assertj-core:${assertjVersion}"
2425
testImplementation "org.mockito:mockito-core:${mockitoVersion}"

0 commit comments

Comments
 (0)