drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jacq...@apache.org
Subject [4/4] drill git commit: DRILL-1790: Improve DataServer inbound message handling. Throw away the message if the manager is null as this means the fragment was recently finished (limit or otherwise canceled).
Date Mon, 01 Dec 2014 05:45:35 GMT
DRILL-1790: Improve DataServer inbound message handling. Throw away the message if the manager
is null as this means the fragment was recently finished (limit or otherwise canceled).


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

Branch: refs/heads/master
Commit: a60e1dbbfa951ac7966d5d0f61437245ef1a084f
Parents: b218ec0
Author: Jacques Nadeau <jacques@apache.org>
Authored: Sun Nov 30 18:07:07 2014 -0800
Committer: Jacques Nadeau <jacques@apache.org>
Committed: Sun Nov 30 20:06:36 2014 -0800

----------------------------------------------------------------------
 .../org/apache/drill/exec/rpc/data/DataServer.java     | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/a60e1dbb/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/data/DataServer.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/data/DataServer.java b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/data/DataServer.java
index 1f261bc..4cbc8fb 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/data/DataServer.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/data/DataServer.java
@@ -113,14 +113,15 @@ public class DataServer extends BasicServer<RpcType, BitServerConnection>
{
         if (body != null) {
           body.release();
         }
-      }
-      BufferAllocator allocator = manager.getFragmentContext().getAllocator();
-      if (body != null) {
-        if (!allocator.takeOwnership((DrillBuf) body.unwrap())) {
-          dataHandler.handle(connection, manager, OOM_FRAGMENT, null, null);
+      }else{
+        BufferAllocator allocator = manager.getFragmentContext().getAllocator();
+        if (body != null) {
+          if (!allocator.takeOwnership((DrillBuf) body.unwrap())) {
+            dataHandler.handle(connection, manager, OOM_FRAGMENT, null, null);
+          }
         }
+        dataHandler.handle(connection, manager, fragmentBatch, (DrillBuf) body, sender);
       }
-      dataHandler.handle(connection, manager, fragmentBatch, (DrillBuf) body, sender);
 
     } catch (FragmentSetupException e) {
       logger.error("Failure while getting fragment manager. {}", QueryIdHelper.getQueryIdentifier(handle),
 e);


Mime
View raw message