PHOENIX-3260 MetadataRegionObserver.postOpen() can prevent region server from 
shutting down for a long duration


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/d9eb45e1
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/d9eb45e1
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/d9eb45e1

Branch: refs/heads/calcite
Commit: d9eb45e14d36f92982c36b85a7132675d6272770
Parents: df0d611
Author: Samarth <samarth.j...@salesforce.com>
Authored: Fri Sep 9 11:24:07 2016 -0700
Committer: Samarth <samarth.j...@salesforce.com>
Committed: Fri Sep 9 11:24:07 2016 -0700

----------------------------------------------------------------------
 .../org/apache/phoenix/coprocessor/MetaDataRegionObserver.java   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/d9eb45e1/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataRegionObserver.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataRegionObserver.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataRegionObserver.java
index 5243154..5beba49 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataRegionObserver.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataRegionObserver.java
@@ -156,7 +156,9 @@ public class MetaDataRegionObserver extends 
BaseRegionObserver {
                 }
             }
         };
-        (new Thread(r)).start();
+        Thread t = new Thread(r);
+        t.setDaemon(true);
+        t.start();
 
         if (!enableRebuildIndex && !blockWriteRebuildIndex) {
             LOG.info("Failure Index Rebuild is skipped by configuration.");

Reply via email to