hgromer commented on code in PR #7084:
URL: https://github.com/apache/hbase/pull/7084#discussion_r2136766895


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/SnapshotProcedure.java:
##########
@@ -143,13 +143,26 @@ protected Flow executeFromState(MasterProcedureEnv env, 
SnapshotState state)
           setNextState(SnapshotState.SNAPSHOT_WRITE_SNAPSHOT_INFO);
           return Flow.HAS_MORE_STATE;
         case SNAPSHOT_WRITE_SNAPSHOT_INFO:
-          SnapshotDescriptionUtils.writeSnapshotInfo(snapshot, workingDir, 
workingDirFS);
           TableState tableState =
             
env.getMasterServices().getTableStateManager().getTableState(snapshotTable);
           if (tableState.isEnabled()) {
+            SnapshotDescriptionUtils.writeSnapshotInfo(snapshot, workingDir, 
workingDirFS);

Review Comment:
   Move inside the if statements to avoid unnecessary I/O in case we need to 
suspend



-- 
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]

Reply via email to