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
…31247) (#37614)

*
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

## Proposed changes

Issue Number: close #xxx

<!--Describe your changes.-->

Co-authored-by: Yongqiang YANG <[email protected]>
  • Loading branch information
SWJTU-ZhangLei and dataroaring authored Jul 10, 2024
1 parent 63cd689 commit dfadf61
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2378,6 +2378,15 @@ public class Config extends ConfigBase {
})
public static int label_num_threshold = 2000;

/* 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;

@ConfField(description = {
"是否开启 Proxy Protocol 支持",
"Whether to enable proxy protocol"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ public void setup(File envHome, String selfNodeName, String selfNodeHostPort,
environmentConfig.setConfigParam(EnvironmentConfig.RESERVED_DISK,
String.valueOf(Config.bdbje_reserved_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 dfadf61

Please sign in to comment.