accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [4/9] accumulo git commit: Merge branch 'ACCUMULO-2388' of github:keith-turner/accumulo into 1.6
Date Tue, 16 Jun 2015 21:42:04 GMT
Merge branch 'ACCUMULO-2388' of github:keith-turner/accumulo into 1.6


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

Branch: refs/heads/1.6
Commit: 25475d0a3f05093975439084944972cb73827537
Parents: ddd3932 6965fb0
Author: Christopher Tubbs <ctubbsii@apache.org>
Authored: Tue Jun 16 17:29:22 2015 -0400
Committer: Christopher Tubbs <ctubbsii@apache.org>
Committed: Tue Jun 16 17:29:22 2015 -0400

----------------------------------------------------------------------
 .../apache/accumulo/tserver/TabletServer.java   | 50 +++++++++++++++-----
 1 file changed, 38 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/25475d0a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
----------------------------------------------------------------------
diff --cc server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
index 0446da3,870abd8..3cffa38
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
@@@ -1587,11 -1588,22 +1588,22 @@@ public class TabletServer extends Abstr
              mutations.add(mutation);
              us.queuedMutationSize += mutation.numBytes();
            }
-           if (us.queuedMutationSize > getSystemConfiguration().getMemoryInBytes(Property.TSERV_MUTATION_QUEUE_MAX))
-             flush(us);
+           if (us.queuedMutationSize > getSystemConfiguration().getMemoryInBytes(Property.TSERV_MUTATION_QUEUE_MAX))
{
 -            try{
++            try {
+               flush(us);
 -            }catch(HoldTimeoutException hte){
++            } catch (HoldTimeoutException hte) {
+               // Assumption is that the client has timed out and is gone. If thats not the
case, then removing the session should cause the client to fail
+               // in such a way that it retries.
+               log.debug("HoldTimeoutException during applyUpdates, removing session");
+               sessionManager.removeSession(updateID, true);
+               reserved = false;
+             }
+           }
          }
        } finally {
-         sessionManager.unreserveSession(us);
 -        if(reserved) {
++        if (reserved) {
+           sessionManager.unreserveSession(us);
+         }
        }
      }
  
@@@ -1769,6 -1777,10 +1777,10 @@@
  
        try {
          flush(us);
+       } catch (HoldTimeoutException e) {
 -        //Assumption is that the client has timed out and is gone.  If thats not the case
throw an exception that will cause it to retry.
++        // Assumption is that the client has timed out and is gone. If thats not the case
throw an exception that will cause it to retry.
+         log.debug("HoldTimeoutException during closeUpdate, reporting no such session");
+         throw new NoSuchScanIDException();
        } finally {
          writeTracker.finishWrite(opid);
        }
@@@ -1807,8 -1819,14 +1819,15 @@@
          throw new NotServingTabletException(tkeyExtent);
        }
  
-       if (!keyExtent.isMeta())
-         TabletServer.this.resourceManager.waitUntilCommitsAreEnabled();
+       if (!keyExtent.isMeta()) {
+         try {
+           TabletServer.this.resourceManager.waitUntilCommitsAreEnabled();
+         } catch (HoldTimeoutException hte) {
 -          //Major hack.  Assumption is that the client has timed out and is gone.  If thats
not the case, then throwing the following will let client know there was a failure and it
should retry.
++          // Major hack. Assumption is that the client has timed out and is gone. If thats
not the case, then throwing the following will let client know there
++          // was a failure and it should retry.
+           throw new NotServingTabletException(tkeyExtent);
+         }
+       }
  
        long opid = writeTracker.startWrite(TabletType.type(keyExtent));
  
@@@ -2088,8 -2106,15 +2107,15 @@@
        if (cs == null || cs.interruptFlag.get())
          throw new NoSuchScanIDException();
  
-       if (!cs.tableId.equals(MetadataTable.ID) && !cs.tableId.equals(RootTable.ID))
-         TabletServer.this.resourceManager.waitUntilCommitsAreEnabled();
 -      if (!cs.tableId.equals(MetadataTable.ID) && !cs.tableId.equals(RootTable.ID)){
 -        try{
++      if (!cs.tableId.equals(MetadataTable.ID) && !cs.tableId.equals(RootTable.ID))
{
++        try {
+           TabletServer.this.resourceManager.waitUntilCommitsAreEnabled();
 -        } catch (HoldTimeoutException hte){
 -          //Assumption is that the client has timed out and is gone.  If thats not the case
throw an exception that will cause it to retry.
++        } catch (HoldTimeoutException hte) {
++          // Assumption is that the client has timed out and is gone. If thats not the case
throw an exception that will cause it to retry.
+           log.debug("HoldTimeoutException during conditionalUpdate, reporting no such session");
+           throw new NoSuchScanIDException();
+         }
+       }
  
        Text tid = new Text(cs.tableId);
        long opid = writeTracker.startWrite(TabletType.type(new KeyExtent(tid, null, null)));


Mime
View raw message