guluo2016 commented on code in PR #6790:
URL: https://github.com/apache/hbase/pull/6790#discussion_r2185522829
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/SnapshotProcedure.java:
##########
@@ -144,12 +145,15 @@ 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);
setNextState(SnapshotState.SNAPSHOT_SNAPSHOT_ONLINE_REGIONS);
} else if (tableState.isDisabled()) {
+ // Set the snapshot type to DISABLED as the table is in DISABLED
state
+ snapshot = snapshot.toBuilder().setType(Type.DISABLED).build();
+ SnapshotDescriptionUtils.writeSnapshotInfo(snapshot, workingDir,
workingDirFS);
setNextState(SnapshotState.SNAPSHOT_SNAPSHOT_CLOSED_REGIONS);
}
Review Comment:
The feedback is reasonable, update the code
--
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]