Skip to content

Commit 57949ca

Browse files
committed
Fix review issues: deduplicate logs and simplify exception handling
1 parent ab078f6 commit 57949ca

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

chainbase/src/main/java/org/tron/core/store/CheckPointV2Store.java

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,23 +63,18 @@ public void updateByBatch(Map<byte[], byte[]> rows) {
6363
}
6464

6565
/**
66-
* close the database.
66+
* Closes the database and releases all resources.
67+
* This method ensures that subclass-specific resources are cleaned up
68+
* before delegating to the parent class for complete resource cleanup.
6769
*/
6870
@Override
6971
public void close() {
70-
logger.debug("******** Begin to close {}. ********", getName());
7172
try {
7273
writeOptions.close();
7374
} catch (Exception e) {
7475
logger.warn("Failed to close writeOptions in {}.", getName(), e);
7576
}
76-
try {
77-
super.close();
78-
} catch (Exception e) {
79-
logger.warn("Failed to close parent resources in {}.", getName(), e);
80-
} finally {
81-
logger.debug("******** End to close {}. ********", getName());
82-
}
77+
super.close();
8378
}
8479

8580
}

0 commit comments

Comments
 (0)