Skip to content

Commit 7f71ab1

Browse files
committed
fix(config): ARM64 ignores db.engine config instead of failing
On ARM64, LevelDB is not available at build time. Instead of throwing an exception that breaks default config startup, warn and override to RocksDB. Also uses equalsIgnoreCase for consistency.
1 parent d57d110 commit 7f71ab1

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

  • framework/src/main/java/org/tron/core/config/args

framework/src/main/java/org/tron/core/config/args/Args.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,14 @@ public static void setParam(final String[] args, final String confFileName) {
136136

137137
/**
138138
* Validate final configuration after all sources (defaults, config, CLI) are applied.
139+
* ARM64 only supports RocksDB; db.engine config is ignored with a warning.
139140
*/
140141
public static void validateConfig() {
141-
if (Arch.isArm64() && !"ROCKSDB".equals(PARAMETER.storage.getDbEngine())) {
142-
throw new TronError(
143-
"ARM64 architecture only supports RocksDB. Current engine: "
144-
+ PARAMETER.storage.getDbEngine(),
145-
TronError.ErrCode.PARAMETER_INIT);
142+
if (Arch.isArm64()
143+
&& !Constant.ROCKSDB.equalsIgnoreCase(PARAMETER.storage.getDbEngine())) {
144+
logger.warn("ARM64 only supports RocksDB, ignoring db.engine='{}'",
145+
PARAMETER.storage.getDbEngine());
146+
PARAMETER.storage.setDbEngine(Constant.ROCKSDB);
146147
}
147148
}
148149

0 commit comments

Comments
 (0)