HDFS-17105. mistakenly purge editLogs even after it is empty in NNStorageRetentionManager. (#6036). Contributed by ConfX.

Signed-off-by: He Xiaoqiao <hexiaoqiao@apache.org>
This commit is contained in:
ConfX 2023-09-19 23:46:57 -04:00 committed by GitHub
parent 512e39e89d
commit 39f36d9071
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -80,6 +80,9 @@ public NNStorageRetentionManager(
Preconditions.checkArgument(numExtraEditsToRetain >= 0, Preconditions.checkArgument(numExtraEditsToRetain >= 0,
DFSConfigKeys.DFS_NAMENODE_NUM_EXTRA_EDITS_RETAINED_KEY + DFSConfigKeys.DFS_NAMENODE_NUM_EXTRA_EDITS_RETAINED_KEY +
" must not be negative"); " must not be negative");
Preconditions.checkArgument(maxExtraEditsSegmentsToRetain >= 0,
DFSConfigKeys.DFS_NAMENODE_MAX_EXTRA_EDITS_SEGMENTS_RETAINED_KEY +
" must not be negative");
this.storage = storage; this.storage = storage;
this.purgeableLogs = purgeableLogs; this.purgeableLogs = purgeableLogs;