diff --git a/java/rocksjni/options.cc b/java/rocksjni/options.cc index aa597a18b9..d8c853694c 100644 --- a/java/rocksjni/options.cc +++ b/java/rocksjni/options.cc @@ -1807,6 +1807,11 @@ jboolean Java_org_rocksdb_Options_allow2pc(JNIEnv* /*env*/, jobject /*jobj*/, return static_cast(opt->allow_2pc); } +/* + * Class: org_rocksdb_Options + * Method: setCheckPointFakeFlush + * Signature: (JZ)V + */ void Java_org_rocksdb_Options_setCheckPointFakeFlush( JNIEnv* /*env*/, jobject /*jobj*/, jlong jhandle, jboolean jcheck_point_fake_flush) { @@ -1814,6 +1819,11 @@ void Java_org_rocksdb_Options_setCheckPointFakeFlush( opt->check_point_fake_flush = static_cast(jcheck_point_fake_flush); } +/* + * Class: org_rocksdb_Options + * Method: checkPointFakeFlush + * Signature: (J)Z + */ jboolean Java_org_rocksdb_Options_checkPointFakeFlush(JNIEnv* /*env*/, jobject /*jobj*/, jlong jhandle) { @@ -4714,6 +4724,29 @@ jboolean Java_org_rocksdb_ColumnFamilyOptions_forceConsistencyChecks( ///////////////////////////////////////////////////////////////////// // TERARKDB_NAMESPACE::DBOptions +/* + * Class: org_rocksdb_DBOptions + * Method: setCheckPointFakeFlush + * Signature: (JZ)V + */ +void Java_org_rocksdb_DBOptions_setCheckPointFakeFlush( + JNIEnv* /*env*/, jobject /*jobj*/, jlong jhandle, + jboolean jcheck_point_fake_flush) { + auto* opt = reinterpret_cast(jhandle); + opt->check_point_fake_flush = static_cast(jcheck_point_fake_flush); +} + +/* + * Class: org_rocksdb_DBOptions + * Method: checkPointFakeFlush + * Signature: (J)Z + */ +jboolean Java_org_rocksdb_DBOptions_checkPointFakeFlush(JNIEnv* /*env*/, + jobject /*jobj*/, + jlong jhandle) { + auto* opt = reinterpret_cast(jhandle); + return static_cast(opt->check_point_fake_flush); +} /* * Class: org_rocksdb_DBOptions diff --git a/java/src/test/java/org/rocksdb/ColumnFamilyOptionsTest.java b/java/src/test/java/org/rocksdb/ColumnFamilyOptionsTest.java index 7a295bd2ba..2e759da345 100644 --- a/java/src/test/java/org/rocksdb/ColumnFamilyOptionsTest.java +++ b/java/src/test/java/org/rocksdb/ColumnFamilyOptionsTest.java @@ -545,4 +545,11 @@ public void maxSubcompactions() { isEqualTo(intValue); } } + @Test + public void gcratio() { + try (final ColumnFamilyOptions opt = new ColumnFamilyOptions()) { + final double gc_ratio = 0.1; + opt.setBlobGcRatio(gc_ratio); + } + } } diff --git a/java/src/test/java/org/rocksdb/DBOptionsTest.java b/java/src/test/java/org/rocksdb/DBOptionsTest.java index dd18272810..65559665d0 100644 --- a/java/src/test/java/org/rocksdb/DBOptionsTest.java +++ b/java/src/test/java/org/rocksdb/DBOptionsTest.java @@ -675,4 +675,11 @@ public void statistics() { assertThat(stats).isNotNull(); } } + @Test + public void fakeflush() { + try(final DBOptions options = new DBOptions()) { + final boolean booleanValue = true; + options.setCheckPointFakeFlush(booleanValue); + } + } } diff --git a/options/db_options.cc b/options/db_options.cc index 0c250ec47a..f7579a429f 100644 --- a/options/db_options.cc +++ b/options/db_options.cc @@ -344,7 +344,7 @@ void MutableDBOptions::Dump(Logger* log) const { zenfs_high_gc_ratio); ROCKS_LOG_HEADER(log, " Options.zenfs_force_ratio: %lf", zenfs_force_gc_ratio); - ROCKS_LOG_HEADER(log, " Options.checkpoint_fake_flush: %lf", + ROCKS_LOG_HEADER(log, " Options.checkpoint_fake_flush: %d", check_point_fake_flush); }