Skip to content

Results of ReadableState.read() should be snapshots of the underlying state #18582

@kennknowles

Description

@kennknowles

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.

Imported from Jira BEAM-2975. Original Jira may contain additional context.
Reported by: millsd@google.com.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions