apache / apache/beam

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

Open
#18,582 0 comments 0 reactions 0 assignees View on GitHub
bug core java P3
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
2d 2h
Merged PRs (30d)
205

Description

Future modification of state should not be reflected in previous calls to read(). For example:

@StateId("tag") BagState state;
Iterable ints = state.read();
state.add(17);
// ints should still be empty here.

Imported from Jira [BEAM-2975](https://issues.apache.org/jira/browse/BEAM-2975). Original Jira may contain additional context.
Reported by: millsd@google.com.

Contributor guide

Open the contributing guide

Research direction

Start by locating the Java definition and implementations of ReadableState.read(), then inspect the BagState example described in the issue. Verify the current behavior and find the relevant state tests. Done means values returned by read() remain unchanged after later state.add() calls.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
data-engineering
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.