[ https://issues.apache.org/jira/browse/HDDS-1649?focusedWorklogId=259959&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-259959 ]
ASF GitHub Bot logged work on HDDS-1649: ---------------------------------------- Author: ASF GitHub Bot Created on: 13/Jun/19 22:22 Start Date: 13/Jun/19 22:22 Worklog Time Spent: 10m Work Description: arp7 commented on pull request #948: HDDS-1649. On installSnapshot notification from OM leader, download checkpoint and reload OM state URL: https://github.com/apache/hadoop/pull/948#discussion_r293599252 ########## File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java ########## @@ -3122,6 +3136,131 @@ public boolean setAcl(OzoneObj obj, List<OzoneAcl> acls) throws IOException { } } + /** + * Download and install latest checkpoint from leader OM. + * If the download checkpoints snapshot index is greater than this OM's + * last applied transaction index, then re-initialize the OM state via this + * checkpoint. Before re-initializing OM state, the OM Ratis server should + * be stopped so that no new transactions can be applied. + * @param leaderId peerNodeID of the leader OM + * @return If checkpoint is installed, return the corresponding termIndex. + * Otherwise, return null. + */ + public TermIndex installSnapshot(String leaderId) { + if (omSnapshotProvider == null) { + LOG.error("OM Snapshot Provider is not configured as there are no peer " + + "nodes."); + return null; + } + + DBCheckpoint omDBcheckpoint; + try { + omDBcheckpoint = omSnapshotProvider.getOzoneManagerDBSnapshot(leaderId); Review comment: One question: currently we are passing `leaderId` = null. So will this call to `getOzoneManagerDBSnapshot` fail? ---------------------------------------------------------------- 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 259959) Time Spent: 1h 10m (was: 1h) > On installSnapshot notification from OM leader, download checkpoint and > reload OM state > --------------------------------------------------------------------------------------- > > Key: HDDS-1649 > URL: https://issues.apache.org/jira/browse/HDDS-1649 > Project: Hadoop Distributed Data Store > Issue Type: Sub-task > Reporter: Hanisha Koneru > Assignee: Hanisha Koneru > Priority: Major > Labels: pull-request-available > Time Spent: 1h 10m > Remaining Estimate: 0h > > When an OM follower receives installSnapshot notification from OM leader, it > should initiate a new checkpoint on the OM leader and download that > checkpoint. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org