NihalJain commented on code in PR #5579: URL: https://github.com/apache/hbase/pull/5579#discussion_r1431122568
########## hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/RestoreSnapshotProcedure.java: ########## @@ -70,6 +71,7 @@ public class RestoreSnapshotProcedure extends AbstractStateMachineTableProcedure<RestoreSnapshotState> { private static final Logger LOG = LoggerFactory.getLogger(RestoreSnapshotProcedure.class); + private TableDescriptor oldTableDescriptor; Review Comment: This variable needs to be added to `RestoreSnapshotStateData` defined in `hbase-protocol-shaded/src/main/protobuf/server/master/MasterProcedure.proto` Also the variable needs to be added in `serializeStateData()` and `deserializeStateData()` of this class. It will throw NPE in case master failover happens before it reaches `RESTORE_SNAPSHOT_UPDATE_TABLE_DESCRIPTOR` or `RESTORE_SNAPSHOT_SYNC_ERASURE_CODING_POLICY` state as `oldTableDescriptor` will become null with serialize/deserialization . -- 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: issues-unsubscr...@hbase.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org