accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject [1/4] git commit: ACCUMULO-3096 stopped retrying metadata updates on contraint violations
Date Thu, 04 Sep 2014 15:58:23 GMT
Repository: accumulo
Updated Branches:
  refs/heads/master e1a6e5284 -> 8ea643599


ACCUMULO-3096 stopped retrying metadata updates on contraint violations


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

Branch: refs/heads/master
Commit: 0a5ceca5396cdc53ebda4b7e581f80d1c7917a72
Parents: b0c3ba8
Author: Keith Turner <kturner@apache.org>
Authored: Tue Sep 2 12:20:42 2014 -0400
Committer: Keith Turner <kturner@apache.org>
Committed: Thu Sep 4 11:50:39 2014 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/accumulo/core/client/impl/Writer.java  | 5 +++++
 .../java/org/apache/accumulo/server/util/MetadataTable.java     | 2 ++
 2 files changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/0a5ceca5/core/src/main/java/org/apache/accumulo/core/client/impl/Writer.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/Writer.java b/core/src/main/java/org/apache/accumulo/core/client/impl/Writer.java
index b5c05aa..ff57f9d 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/Writer.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/Writer.java
@@ -95,6 +95,11 @@ public class Writer {
       } catch (NotServingTabletException e) {
         log.trace("Not serving tablet, server = " + tabLoc.tablet_location);
         TabletLocator.getInstance(instance, table).invalidateCache(tabLoc.tablet_extent);
+      } catch (ConstraintViolationException cve) {
+        log.error("error sending update to " + tabLoc.tablet_location + ": " + cve);
+        // probably do not need to invalidate cache, but it does not hurt
+        TabletLocator.getInstance(instance, table).invalidateCache(tabLoc.tablet_extent);
+        throw cve;
       } catch (TException e) {
         log.error("error sending update to " + tabLoc.tablet_location + ": " + e);
         TabletLocator.getInstance(instance, table).invalidateCache(tabLoc.tablet_extent);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0a5ceca5/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java b/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java
index 477718d..3d281f6 100644
--- a/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java
+++ b/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java
@@ -131,6 +131,8 @@ public class MetadataTable extends org.apache.accumulo.core.util.MetadataTable
{
         log.error(e, e);
       } catch (ConstraintViolationException e) {
         log.error(e, e);
+        // retrying when a CVE occurs is probably futile and can cause problems, see ACCUMULO-3096
+        throw new RuntimeException(e);
       } catch (TableNotFoundException e) {
         log.error(e, e);
       }


Mime
View raw message