This is an automated email from the ASF dual-hosted git repository.

vjasani pushed a commit to branch 5.2
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/5.2 by this push:
     new 9cfc83c215 PHOENIX-7367 - Snapshot based mapreduce jobs fails after 
HBASE-28401 (#1941)
9cfc83c215 is described below

commit 9cfc83c2150bbd29f547715c58dfc8b36fd6ceec
Author: Ujjawal <[email protected]>
AuthorDate: Wed Sep 4 04:46:07 2024 +0530

    PHOENIX-7367 - Snapshot based mapreduce jobs fails after HBASE-28401 (#1941)
---
 .../src/main/java/org/apache/phoenix/iterate/SnapshotScanner.java     | 4 ++++
 1 file changed, 4 insertions(+)

diff --git 
a/phoenix-core-server/src/main/java/org/apache/phoenix/iterate/SnapshotScanner.java
 
b/phoenix-core-server/src/main/java/org/apache/phoenix/iterate/SnapshotScanner.java
index 288e8efc4c..1a98515ba0 100644
--- 
a/phoenix-core-server/src/main/java/org/apache/phoenix/iterate/SnapshotScanner.java
+++ 
b/phoenix-core-server/src/main/java/org/apache/phoenix/iterate/SnapshotScanner.java
@@ -48,6 +48,7 @@ import org.apache.hadoop.hbase.util.CommonFSUtils;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.client.Table;
+import org.apache.hadoop.hbase.regionserver.MemStoreLAB;
 import org.apache.phoenix.coprocessorclient.BaseScannerRegionObserverConstants;
 import org.apache.phoenix.jdbc.PhoenixConnection;
 import org.apache.phoenix.jdbc.PhoenixDatabaseMetaData;
@@ -143,6 +144,9 @@ public class SnapshotScanner extends AbstractClientScanner {
             String.valueOf(32 * 1024 * 1024L));
     // don't allow L2 bucket cache for non RS process to avoid unexpected disk 
usage.
     conf.unset(HConstants.BUCKET_CACHE_IOENGINE_KEY);
+    //PHOENIX-7367 - non RS process doesn't have MemstoreLab's ChunkCreator 
initialized
+    //so we disable it to avoid NPE while closing the memstore as part of 
region close
+    conf.setBoolean(MemStoreLAB.USEMSLAB_KEY, false);
     region.setBlockCache(BlockCacheFactory.createBlockCache(conf));
     // we won't initialize the MobFileCache when not running in RS process. so 
provided an
     // initialized cache. Consider the case: an CF was set from an mob to 
non-mob. if we only

Reply via email to