You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by GitBox <gi...@apache.org> on 2020/09/10 02:17:55 UTC

[GitHub] [phoenix] wangchao316 commented on a change in pull request #874: PHOENIX-5860 Throw exception which region is closing or splitting when delete data

wangchao316 commented on a change in pull request #874:
URL: https://github.com/apache/phoenix/pull/874#discussion_r486022598



##########
File path: phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
##########
@@ -1430,4 +1430,17 @@ public InternalScanner run() throws Exception {
         }
         return s;
     }
+
+    /**
+     * roll back after split failed, will isRegionClosingOrSplitting set false,
+     * and then write region will is available
+     * @param ctx
+     * @throws IOException
+     */
+    @Override
+    public void preRollBackSplit(ObserverContext<RegionCoprocessorEnvironment> ctx) throws IOException {

Review comment:
       Thanks @joshelser , you are right, postRollBackSplit seems more correct to me . I will close this MR, and reopen a new MR, which use postRollBackSplit method.
   HBase 2.x does not have this issue, because 2.x split failed, by SplitTableRegionProcedure rollbackState method , assign open region, so isRegionClosingOrSplitting is false.
   
   




----------------------------------------------------------------
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:
users@infra.apache.org