[
https://issues.apache.org/jira/browse/BEAM-11952?focusedWorklogId=564121&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-564121
]
ASF GitHub Bot logged work on BEAM-11952:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 10/Mar/21 22:57
Start Date: 10/Mar/21 22:57
Worklog Time Spent: 10m
Work Description: y1chi commented on a change in pull request #14182:
URL: https://github.com/apache/beam/pull/14182#discussion_r591933447
##########
File path:
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/WindowMergingFnRunner.java
##########
@@ -151,10 +151,12 @@ public void merge(Collection<W> toBeMerged, W
mergeResult) throws Exception {
KV<T, Iterable<W>> windowsToMerge) throws Exception {
currentWindows = Sets.newHashSet(windowsToMerge.getValue());
windowFn.mergeWindows((MergeContext) mergeContext);
+ ArrayList mergedWindowsCopy = new ArrayList<>(mergedWindows);
for (KV<W, Collection<W>> mergedWindow : mergedWindows) {
currentWindows.removeAll(mergedWindow.getValue());
}
- return KV.of(windowsToMerge.getKey(), KV.of(currentWindows, (Iterable)
mergedWindows));
+ mergedWindows.clear();
Review comment:
It definitely can be considered wrong, since the previous merge result
could have been processed by runner and the related windows could have been
cleaned up. Added in unit test.
----------------------------------------------------------------
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 564121)
Time Spent: 40m (was: 0.5h)
> WindowMergingFnRunner unnecessarily keeps previous merged results
> -----------------------------------------------------------------
>
> Key: BEAM-11952
> URL: https://issues.apache.org/jira/browse/BEAM-11952
> Project: Beam
> Issue Type: Bug
> Components: sdk-java-harness
> Reporter: Yichi Zhang
> Priority: P2
> Time Spent: 40m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)