ndimiduk commented on a change in pull request #1018: HBASE-23652 Move the unsupported procedure type check before migratin… URL: https://github.com/apache/hbase/pull/1018#discussion_r366577955
########## File path: hbase-server/src/main/java/org/apache/hadoop/hbase/procedure2/store/region/RegionProcedureStore.java ########## @@ -347,6 +393,22 @@ public void handleCorrupted(ProcedureIterator procIter) throws IOException { } } }); + + // check whether there are unsupported procedures, this could happen when we are migrating from + // 2.1-. We used to do this in HMaster, after loading all the procedures from procedure store, + // but here we have to do it before migrating, otherwise, if we find some unsupported + // procedures, the users can not go back to 2.1 to finish them any more, as all the data are now + // in the new region based procedure store, which is not supported in 2.1-. + checkUnsupportedProcedure(activeProcsByType); + + MutableLong maxProcIdFromProcs = new MutableLong(-1); + for (Procedure<?> proc : procs) { + update(proc); + if (proc.getProcId() > maxProcIdFromProcs.longValue()) { + maxProcIdFromProcs.setValue(proc.getProcId()); + } + } + LOG.info("Migrated {} procedures", procs.size()); Review comment: nit: "Migrated {} existing procedures from the old storage format." ---------------------------------------------------------------- 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 With regards, Apache Git Services