Skip to content

Commit

Permalink
[feat](fe) Add ignore_bdbje_log_checksum_read for BDBEnvironment
Browse files Browse the repository at this point in the history
* https://forums.oracle.com/ords/apexds/post/je-log-checksumexception-2812

* When meeting disk damage or other reason described in the oracle forums
  and fe cannot start due to `com.sleepycat.je.log.ChecksumException`, we
  add a param `ignore_bdbje_log_checksum_read` to ignore the exception, but
  there is no guarantee of correctness for bdbje kv data
  • Loading branch information
SWJTU-ZhangLei committed Feb 22, 2024
1 parent bd78243 commit 44d7b0f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2488,6 +2488,14 @@ public class Config extends ConfigBase {
options = {"default", "ranger-doris"})
public static String access_controller_type = "default";

/* https://forums.oracle.com/ords/apexds/post/je-log-checksumexception-2812
when meeting disk damage or other reason described in the oracle forums
and fe cannot start due to `com.sleepycat.je.log.ChecksumException`, we
add a param `ignore_bdbje_log_checksum_read` to ignore the exception, but
there is no guarantee of correctness for bdbje kv data
*/
@ConfField
public static boolean ignore_bdbje_log_checksum_read = false;
//==========================================================================
// begin of cloud config
//==========================================================================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ public void setup(File envHome, String selfNodeName, String selfNodeHostPort,
environmentConfig.setConfigParam(EnvironmentConfig.FREE_DISK,
String.valueOf(Config.bdbje_free_disk_bytes));

if (Config.ignore_bdbje_log_checksum_read) {
environmentConfig.setConfigParam(EnvironmentConfig.LOG_CHECKSUM_READ, "false");
LOG.warn("set EnvironmentConfig.LOG_CHECKSUM_READ false");
}

if (BDBJE_LOG_LEVEL.contains(Config.bdbje_file_logging_level)) {
java.util.logging.Logger parent = java.util.logging.Logger.getLogger("com.sleepycat.je");
parent.setLevel(Level.parse(Config.bdbje_file_logging_level));
Expand Down

0 comments on commit 44d7b0f

Please sign in to comment.