[ https://issues.apache.org/jira/browse/BEAM-2975?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16174021#comment-16174021 ]
ASF GitHub Bot commented on BEAM-2975: -------------------------------------- GitHub user dpmills opened a pull request: https://github.com/apache/beam/pull/3876 [BEAM-2975] Clarify semantics of objects returned by state access R: @tgroh You can merge this pull request into a Git repository by running: $ git pull https://github.com/dpmills/incubator-beam state Alternatively you can review and apply these changes as the patch at: https://github.com/apache/beam/pull/3876.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #3876 ---- commit 306f7004753715dab68ee0210dcf85e24c255049 Author: Daniel Mills <mil...@google.com> Date: 2017-09-20T23:35:06Z Clarify semantics of objects returned by state access ---- > Results of ReadableState.read() should be snapshots of the underlying state > --------------------------------------------------------------------------- > > Key: BEAM-2975 > URL: https://issues.apache.org/jira/browse/BEAM-2975 > Project: Beam > Issue Type: Bug > Components: sdk-java-core > Reporter: Daniel Mills > Assignee: Daniel Mills > Priority: Minor > > Future modification of state should not be reflected in previous calls to > read(). For example: > @StateId("tag") BagState<Integer> state; > Iterable<Integer> ints = state.read(); > state.add(17); > // ints should still be empty here. -- This message was sent by Atlassian JIRA (v6.4.14#64029)