You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by ja...@apache.org on 2014/12/01 06:45:35 UTC

[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).

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 <ja...@apache.org>
Authored: Sun Nov 30 18:07:07 2014 -0800
Committer: Jacques Nadeau <ja...@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);