Skip to content

Commit 6364a54

Browse files
fix: 18405: Bucket integrity check in HDHM.ReadUpdateBucketTask can be improved - cherry-pick. (#18406)
Signed-off-by: Ivan Malygin <[email protected]> Co-authored-by: artemananiev <[email protected]>
1 parent a5ff3bd commit 6364a54

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

platform-sdk/swirlds-merkledb/src/main/java/com/swirlds/merkledb/files/hashmap/HalfDiskHashMap.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,8 +607,11 @@ protected boolean onExecute() throws IOException {
607607
// Read from bytes
608608
bucket.readFrom(bucketData);
609609
if (bucketIndex != bucket.getBucketIndex()) {
610-
throw new RuntimeException(
610+
logger.warn(
611+
MERKLE_DB.getMarker(),
611612
"Bucket index integrity check " + bucketIndex + " != " + bucket.getBucketIndex());
613+
bucket.clear();
614+
bucket.setBucketIndex(bucketIndex);
612615
}
613616
}
614617
// Apply all updates

0 commit comments

Comments
 (0)