You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@nemo.apache.org by GitBox <gi...@apache.org> on 2020/11/09 06:44:25 UTC

[GitHub] [incubator-nemo] jaehwan0214 commented on a change in pull request #304: [NEMO-394] Exchange data via shared memory

jaehwan0214 commented on a change in pull request #304:
URL: https://github.com/apache/incubator-nemo/pull/304#discussion_r519580659



##########
File path: runtime/executor/src/main/java/org/apache/nemo/runtime/executor/task/MultiThreadParentTaskDataFetcher.java
##########
@@ -127,14 +129,19 @@ private void fetchDataLazily() {
                   watermarkWithIndex.getIndex(), watermarkWithIndex.getWatermark());
               }
             } else {
+              if (element instanceof Finishmark) {
+                isFinishMarkProduced = true;
+              }
               // data element
               elementQueue.offer(element);
             }
           }
-
           // This iterator is finished.
           countBytesSynchronized(iterator);
-          elementQueue.offer(Finishmark.getInstance());
+          // If the current iterator hasn't produced finish mark, put it into the global queue.
+          if (!isFinishMarkProduced) {

Review comment:
       When the local output context closes, it produces a finish mark. In this case, the data fetcher receives a finish mark from the iterator. Then, the data fetcher shouldn't produce another finish mark when the iterator is finished. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org