[ 
https://issues.apache.org/jira/browse/BEAM-5028?focusedWorklogId=128567&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-128567
 ]

ASF GitHub Bot logged work on BEAM-5028:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 29/Jul/18 17:47
            Start Date: 29/Jul/18 17:47
    Worklog Time Spent: 10m 
      Work Description: reuvenlax commented on a change in pull request #6075: 
[BEAM-5028] Finalize writes before returning filenames via WriteFileResults
URL: https://github.com/apache/beam/pull/6075#discussion_r205982049
 
 

 ##########
 File path: sdks/java/core/src/main/java/org/apache/beam/sdk/io/WriteFiles.java
 ##########
 @@ -794,11 +794,11 @@ public void process(ProcessContext c) throws Exception {
                 ? writeOperation.finalizeDestination(
                     defaultDest, GlobalWindow.INSTANCE, fixedNumShards, 
fileResults)
                 : finalizeAllDestinations(fileResults, fixedNumShards);
+        writeOperation.moveToOutputFiles(resultsToFinalFilenames);
 
 Review comment:
   This looks good to me (and I'll go ahead and merge this PR). However I am 
confused as to why this makes a difference. My understanding is that the 
outputs should not be delivered until after the DoFn finishes executing, which 
means that the order inside the DoFn should not matter.

----------------------------------------------------------------
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]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 128567)
    Time Spent: 20m  (was: 10m)

> getPerDestinationOutputFilenames() is getting processed before write is 
> finished
> --------------------------------------------------------------------------------
>
>                 Key: BEAM-5028
>                 URL: https://issues.apache.org/jira/browse/BEAM-5028
>             Project: Beam
>          Issue Type: Bug
>          Components: io-java-files
>    Affects Versions: 2.5.0
>            Reporter: Jozef Vilcek
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> I believe I am hitting a race condition on finalising writes vs notification 
> events about frites being done.
> It looks to me that WriteFilesResult.getPerDestinationOutputFilenames() can 
> announce files before they are finished:
> [https://github.com/apache/beam/blob/release-2.5.0/sdks/java/core/src/main/java/org/apache/beam/sdk/io/WriteFiles.java#L799]
> This is related to BEAM-3268 where it appears to not be fully fixed.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to