You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Beam JIRA Bot (Jira)" <ji...@apache.org> on 2020/08/25 17:07:00 UTC

[jira] [Commented] (BEAM-10326) Combine API to increase safety when accumulator is mutated

    [ https://issues.apache.org/jira/browse/BEAM-10326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17184204#comment-17184204 ] 

Beam JIRA Bot commented on BEAM-10326:
--------------------------------------

This issue is P2 but has been unassigned without any comment for 60 days so it has been labeled "stale-P2". If this issue is still affecting you, we care! Please comment and remove the label. Otherwise, in 14 days the issue will be moved to P3.

Please see https://beam.apache.org/contribute/jira-priorities/ for a detailed explanation of what these priorities mean.


> Combine API to increase safety when accumulator is mutated
> ----------------------------------------------------------
>
>                 Key: BEAM-10326
>                 URL: https://issues.apache.org/jira/browse/BEAM-10326
>             Project: Beam
>          Issue Type: New Feature
>          Components: sdk-java-core
>            Reporter: Kenneth Knowles
>            Priority: P2
>              Labels: stale-P2
>
> Combine docs for e.g. {{mergeAccumulators}} say
> "only the first accumulator may be modified and returned for efficiency; the other accumulators should not be mutated, because they may be shared with other code and mutating them could lead to incorrect results or data corruption."
> This is fine, but the API is odd: {{AccumT mergeAccumulators(Iterable<AccumT> accumulators)}} implies that all accumulators are treated equally.
> It has been suggested to create a new one more like {{AccumT mergeAccumulators(AccumT mutable, Iterable<AccumT> immutableAccums)}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)