hanishakoneru commented on a change in pull request #651: HDDS-1339. Implement
ratis snapshots on OM
URL: https://github.com/apache/hadoop/pull/651#discussion_r271443794
##########
File path:
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerStateMachine.java
##########
@@ -161,7 +161,10 @@ public TransactionContext startTransaction(
@Override
public long takeSnapshot() throws IOException {
LOG.info("Saving Ratis snapshot on the OM.");
- return ozoneManager.saveRatisSnapshot();
+ if (ozoneManager != null) {
+ return ozoneManager.saveRatisSnapshot();
+ }
+ return 0;
Review comment:
We do return the last applied index which is being stored on disk. The null
check is for tests only (TestOzoneManagerRatisServer).
Ratis currently does not do anything with the returned value.
----------------------------------------------------------------
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]