Ben-Zvi commented on a change in pull request #1408: DRILL-6453: Resolve 
deadlock when reading from build and probe sides simultaneously in HashJoin
URL: https://github.com/apache/drill/pull/1408#discussion_r206743497
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/HashJoinBatch.java
 ##########
 @@ -381,16 +409,14 @@ public HashJoinMemoryCalculator getCalculatorImpl() {
 
   @Override
   public IterOutcome innerNext() {
-    if (!prefetched) {
+    if (!prefetchedBuild) {
       // If we didn't retrieve our first data hold batch, we need to do it now.
-      prefetched = true;
-      prefetchFirstBatchFromBothSides();
+      prefetchedBuild = true;
+      prefetchFirstBuildBatch();
 
       // Handle emitting the correct outcome for termination conditions
-      // Use the state set by prefetchFirstBatchFromBothSides to emit the 
correct termination outcome.
+      // Use the state set by prefetchFirstBuildBatch to emit the correct 
termination outcome.
 
 Review comment:
   Code cleaning: The check below (switch statement) can be done as part of the 
identical check after executeBuildPhase() (which is skipped anyway if STOP).  
Also maybe move the "wasKilled" check first thing in innerNext().

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to