[ https://issues.apache.org/jira/browse/HBASE-28241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17793113#comment-17793113 ]
Duo Zhang commented on HBASE-28241: ----------------------------------- {code} /** * Prepare merge and do some check */ private boolean prepareMergeRegion(final MasterProcedureEnv env) throws IOException { // Fail if we are taking snapshot for the given table TableName tn = regionsToMerge[0].getTable(); if (env.getMasterServices().getSnapshotManager().isTakingSnapshot(tn)) { throw new MergeRegionException("Skip merging regions " + RegionInfo.getShortNameToLog(regionsToMerge) + ", because we are snapshotting " + tn); } {code} > The snapshot operation encountered an NPE and failed. > ----------------------------------------------------- > > Key: HBASE-28241 > URL: https://issues.apache.org/jira/browse/HBASE-28241 > Project: HBase > Issue Type: Bug > Affects Versions: 3.0.0-beta-1 > Reporter: Haiping lv > Assignee: Haiping lv > Priority: Major > > Executing a merge region before the snapshot operation is completed will > result in an NPE error for the snapshot operation and cause it to fail > Triggering logic > # Execute the snapshot command. > # Merge regions before the snapshot is completed. > # After the merge is completed, the two parent regions will be cleaned up. > # An NPE will be reported when the snapshot operation is performed on that > parent region. The log is as follow: > {code:java} > 2023-11-20T23:26:07,061 ERROR [PEWorker-13] procedure2.ProcedureExecutor: > CODE-BUG: Uncaught runtime exception: pid=238720, ppid=238714, > state=RUNNABLE, hasLock=true; SnapshotRegionProcedure > c47539f1d6032ba1a037f5279c22baa0 > java.lang.NullPointerException: null > at > org.apache.hadoop.hbase.master.procedure.SnapshotRegionProcedure.execute(SnapshotRegionProcedure.java:160) > ~[hbase-server-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT] > at > org.apache.hadoop.hbase.master.procedure.SnapshotRegionProcedure.execute(SnapshotRegionProcedure.java:58) > ~[hbase-server-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT] > at > org.apache.hadoop.hbase.procedure2.Procedure.doExecute(Procedure.java:921) > ~[hbase-procedure-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT] > at > org.apache.hadoop.hbase.procedure2.ProcedureExecutor.execProcedure(ProcedureExecutor.java:1649) > ~[hbase-procedure-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT] > at > org.apache.hadoop.hbase.procedure2.ProcedureExecutor.executeProcedure(ProcedureExecutor.java:1395) > ~[hbase-procedure-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT] > at > org.apache.hadoop.hbase.procedure2.ProcedureExecutor.access$1000(ProcedureExecutor.java:75) > ~[hbase-procedure-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT] > at > org.apache.hadoop.hbase.procedure2.ProcedureExecutor$WorkerThread.runProcedure(ProcedureExecutor.java:1961) > ~[hbase-procedure-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT] > at org.apache.hadoop.hbase.trace.TraceUtil.trace(TraceUtil.java:216) > ~[hbase-common-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT] > at > org.apache.hadoop.hbase.procedure2.ProcedureExecutor$WorkerThread.run(ProcedureExecutor.java:1988) > ~[hbase-procedure-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT] {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)