ChenSammi commented on code in PR #3346:
URL: https://github.com/apache/ozone/pull/3346#discussion_r864424227
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueContainer.java:
##########
@@ -356,22 +379,25 @@ public void close() throws StorageContainerException {
// Second sync should be a very light operation as sync has already
// been done outside the lock.
flushAndSyncDB();
- updateContainerData(containerData::closeContainer);
+ updateContainerData(closer);
clearPendingPutBlockCache();
} finally {
writeUnlock();
}
- LOG.info("Container {} is closed with bcsId {}.",
- containerData.getContainerID(),
- containerData.getBlockCommitSequenceId());
}
- @Override
- public void updateDataScanTimestamp(Instant time)
+ /**
+ * For db-per-volume schemas, we don't flush and sync the whole db
+ * on closing of a single container.
+ * @param closer
+ * @throws StorageContainerException
+ */
+ private void closeWithoutFlush(Runnable closer)
Review Comment:
Can we merge closeWithFlush and closeWithoutFlush into one function, using
the parameter to distinguish flush or not flush?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]