tephra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From poo...@apache.org
Subject [2/2] incubator-tephra git commit: TEPHRA-270 Do not refresh the transaction state during co-processor startup to prevent deadlocks
Date Tue, 01 May 2018 23:51:10 GMT
TEPHRA-270 Do not refresh the transaction state during co-processor startup to prevent deadlocks

This closes #72

Signed-off-by: poorna <poorna@apache.org>


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

Branch: refs/heads/master
Commit: fab3aa352237d0191a7f655173d092b54e56106d
Parents: 69fec91
Author: poorna <poorna@apache.org>
Authored: Wed Apr 25 16:51:56 2018 -0700
Committer: poorna <poorna@apache.org>
Committed: Tue May 1 16:50:07 2018 -0700

----------------------------------------------------------------------
 .../org/apache/tephra/coprocessor/TransactionStateCache.java    | 5 -----
 .../tephra/hbase/coprocessor/TransactionProcessorTest.java      | 2 +-
 .../tephra/hbase/coprocessor/TransactionProcessorTest.java      | 2 +-
 .../tephra/hbase/coprocessor/TransactionProcessorTest.java      | 2 +-
 .../tephra/hbase/coprocessor/TransactionProcessorTest.java      | 2 +-
 .../tephra/hbase/coprocessor/TransactionProcessorTest.java      | 2 +-
 .../tephra/hbase/coprocessor/TransactionProcessorTest.java      | 2 +-
 .../tephra/hbase/coprocessor/TransactionProcessorTest.java      | 2 +-
 .../tephra/hbase/coprocessor/TransactionProcessorTest.java      | 5 +----
 9 files changed, 8 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tephra/blob/fab3aa35/tephra-core/src/main/java/org/apache/tephra/coprocessor/TransactionStateCache.java
----------------------------------------------------------------------
diff --git a/tephra-core/src/main/java/org/apache/tephra/coprocessor/TransactionStateCache.java
b/tephra-core/src/main/java/org/apache/tephra/coprocessor/TransactionStateCache.java
index 553d3ce..a80ce61 100644
--- a/tephra-core/src/main/java/org/apache/tephra/coprocessor/TransactionStateCache.java
+++ b/tephra-core/src/main/java/org/apache/tephra/coprocessor/TransactionStateCache.java
@@ -71,11 +71,6 @@ public class TransactionStateCache extends AbstractIdleService implements
Config
 
   @Override
   protected void startUp() throws Exception {
-    try {
-      refreshState();
-    } catch (IOException ioe) {
-      LOG.info("Error refreshing transaction state cache.", ioe);
-    }
     startRefreshService();
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-tephra/blob/fab3aa35/tephra-hbase-compat-0.96/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
----------------------------------------------------------------------
diff --git a/tephra-hbase-compat-0.96/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
b/tephra-hbase-compat-0.96/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
index 9615d8e..860c170 100644
--- a/tephra-hbase-compat-0.96/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
+++ b/tephra-hbase-compat-0.96/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
@@ -613,7 +613,7 @@ public class TransactionProcessorTest {
     cache.setConf(conf);
     cache.startAndWait();
     // verify that the transaction snapshot read matches what we wrote in setupBeforeClass()
-    TransactionVisibilityState cachedSnapshot = cache.getLatestState();
+    TransactionVisibilityState cachedSnapshot = waitForTransactionState(cache);
     assertNotNull(cachedSnapshot);
     assertEquals(invalidSet, cachedSnapshot.getInvalid());
     cache.stopAndWait();

http://git-wip-us.apache.org/repos/asf/incubator-tephra/blob/fab3aa35/tephra-hbase-compat-0.98/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
----------------------------------------------------------------------
diff --git a/tephra-hbase-compat-0.98/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
b/tephra-hbase-compat-0.98/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
index dcb8314..fbeaf4c 100644
--- a/tephra-hbase-compat-0.98/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
+++ b/tephra-hbase-compat-0.98/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
@@ -618,7 +618,7 @@ public class TransactionProcessorTest {
     cache.setConf(conf);
     cache.startAndWait();
     // verify that the transaction snapshot read matches what we wrote in setupBeforeClass()
-    TransactionVisibilityState cachedSnapshot = cache.getLatestState();
+    TransactionVisibilityState cachedSnapshot = waitForTransactionState(cache);
     assertNotNull(cachedSnapshot);
     assertEquals(invalidSet, cachedSnapshot.getInvalid());
     cache.stopAndWait();

http://git-wip-us.apache.org/repos/asf/incubator-tephra/blob/fab3aa35/tephra-hbase-compat-1.0-cdh/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
----------------------------------------------------------------------
diff --git a/tephra-hbase-compat-1.0-cdh/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
b/tephra-hbase-compat-1.0-cdh/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
index 016adbd..295af8f 100644
--- a/tephra-hbase-compat-1.0-cdh/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
+++ b/tephra-hbase-compat-1.0-cdh/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
@@ -600,7 +600,7 @@ public class TransactionProcessorTest {
     cache.setConf(conf);
     cache.startAndWait();
     // verify that the transaction snapshot read matches what we wrote in setupBeforeClass()
-    TransactionVisibilityState cachedSnapshot = cache.getLatestState();
+    TransactionVisibilityState cachedSnapshot = waitForTransactionState(cache);
     assertNotNull(cachedSnapshot);
     assertEquals(invalidSet, cachedSnapshot.getInvalid());
     cache.stopAndWait();

http://git-wip-us.apache.org/repos/asf/incubator-tephra/blob/fab3aa35/tephra-hbase-compat-1.0/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
----------------------------------------------------------------------
diff --git a/tephra-hbase-compat-1.0/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
b/tephra-hbase-compat-1.0/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
index 5328aef..e854a2d 100644
--- a/tephra-hbase-compat-1.0/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
+++ b/tephra-hbase-compat-1.0/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
@@ -600,7 +600,7 @@ public class TransactionProcessorTest {
     cache.setConf(conf);
     cache.startAndWait();
     // verify that the transaction snapshot read matches what we wrote in setupBeforeClass()
-    TransactionVisibilityState cachedSnapshot = cache.getLatestState();
+    TransactionVisibilityState cachedSnapshot = waitForTransactionState(cache);
     assertNotNull(cachedSnapshot);
     assertEquals(invalidSet, cachedSnapshot.getInvalid());
     cache.stopAndWait();

http://git-wip-us.apache.org/repos/asf/incubator-tephra/blob/fab3aa35/tephra-hbase-compat-1.1-base/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
----------------------------------------------------------------------
diff --git a/tephra-hbase-compat-1.1-base/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
b/tephra-hbase-compat-1.1-base/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
index 3cad210..4b1ba8b 100644
--- a/tephra-hbase-compat-1.1-base/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
+++ b/tephra-hbase-compat-1.1-base/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
@@ -602,7 +602,7 @@ public class TransactionProcessorTest {
     cache.setConf(conf);
     cache.startAndWait();
     // verify that the transaction snapshot read matches what we wrote in setupBeforeClass()
-    TransactionVisibilityState cachedSnapshot = cache.getLatestState();
+    TransactionVisibilityState cachedSnapshot = waitForTransactionState(cache);
     assertNotNull(cachedSnapshot);
     assertEquals(invalidSet, cachedSnapshot.getInvalid());
     cache.stopAndWait();

http://git-wip-us.apache.org/repos/asf/incubator-tephra/blob/fab3aa35/tephra-hbase-compat-1.3/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
----------------------------------------------------------------------
diff --git a/tephra-hbase-compat-1.3/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
b/tephra-hbase-compat-1.3/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
index 95acc3d..8ca5720 100644
--- a/tephra-hbase-compat-1.3/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
+++ b/tephra-hbase-compat-1.3/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
@@ -603,7 +603,7 @@ public class TransactionProcessorTest {
     cache.setConf(conf);
     cache.startAndWait();
     // verify that the transaction snapshot read matches what we wrote in setupBeforeClass()
-    TransactionVisibilityState cachedSnapshot = cache.getLatestState();
+    TransactionVisibilityState cachedSnapshot = waitForTransactionState(cache);
     assertNotNull(cachedSnapshot);
     assertEquals(invalidSet, cachedSnapshot.getInvalid());
     cache.stopAndWait();

http://git-wip-us.apache.org/repos/asf/incubator-tephra/blob/fab3aa35/tephra-hbase-compat-1.4/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
----------------------------------------------------------------------
diff --git a/tephra-hbase-compat-1.4/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
b/tephra-hbase-compat-1.4/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
index 95acc3d..8ca5720 100644
--- a/tephra-hbase-compat-1.4/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
+++ b/tephra-hbase-compat-1.4/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
@@ -603,7 +603,7 @@ public class TransactionProcessorTest {
     cache.setConf(conf);
     cache.startAndWait();
     // verify that the transaction snapshot read matches what we wrote in setupBeforeClass()
-    TransactionVisibilityState cachedSnapshot = cache.getLatestState();
+    TransactionVisibilityState cachedSnapshot = waitForTransactionState(cache);
     assertNotNull(cachedSnapshot);
     assertEquals(invalidSet, cachedSnapshot.getInvalid());
     cache.stopAndWait();

http://git-wip-us.apache.org/repos/asf/incubator-tephra/blob/fab3aa35/tephra-hbase-compat-2.0/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
----------------------------------------------------------------------
diff --git a/tephra-hbase-compat-2.0/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
b/tephra-hbase-compat-2.0/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
index e909d73..08efdd4 100644
--- a/tephra-hbase-compat-2.0/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
+++ b/tephra-hbase-compat-2.0/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionProcessorTest.java
@@ -21,9 +21,7 @@ package org.apache.tephra.hbase.coprocessor;
 import com.google.common.collect.ImmutableSortedMap;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
-
 import it.unimi.dsi.fastutil.longs.LongArrayList;
-
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
@@ -42,7 +40,6 @@ import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder;
 import org.apache.hadoop.hbase.client.Delete;
 import org.apache.hadoop.hbase.client.Put;
-import org.apache.hadoop.hbase.client.RegionInfoBuilder;
 import org.apache.hadoop.hbase.client.Scan;
 import org.apache.hadoop.hbase.client.TableDescriptorBuilder;
 import org.apache.hadoop.hbase.io.util.MemorySizeUtil;
@@ -633,7 +630,7 @@ public class TransactionProcessorTest {
     cache.setConf(conf);
     cache.startAndWait();
     // verify that the transaction snapshot read matches what we wrote in setupBeforeClass()
-    TransactionVisibilityState cachedSnapshot = cache.getLatestState();
+    TransactionVisibilityState cachedSnapshot = waitForTransactionState(cache);
     assertNotNull(cachedSnapshot);
     assertEquals(invalidSet, cachedSnapshot.getInvalid());
     cache.stopAndWait();


Mime
View raw message