supratimdeka commented on a change in pull request #1319: HDDS-1981: Datanode
should sync db when container is moved to CLOSED or QUASI_CLOSED state
URL: https://github.com/apache/hadoop/pull/1319#discussion_r316139740
##########
File path:
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueContainer.java
##########
@@ -365,6 +375,22 @@ void compactDB() throws StorageContainerException {
}
}
+ private void flushAndSyncDB() throws StorageContainerException {
+ try {
+ try (ReferenceCountedDB db = BlockUtils.getDB(containerData, config)) {
+ db.getStore().flushDB(true);
+ LOG.info("Container {} is synced with bcsId {}.",
Review comment:
might be a good idea to move this log out into close() and quasiClose(). So
that flushAndSyncDB is a utility routine which can, in principle, be invoked
outside of close/quasiClose.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]