apache / apache/beam

BagState.isEmpty needs a tighter spec

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

Description

Consider the following:

```

BagState myBag = // empty
ReadableState isMyBagEmpty = myBag.isEmpty();
myBag.add(bizzle);
bool
empty = isMyBagEmpty.read();

```

Should `empty` be true or false? We need a consistent answer, across all kinds of state, when snapshots are required.

Imported from Jira [BEAM-2980](https://issues.apache.org/jira/browse/BEAM-2980). Original Jira may contain additional context.
Reported by: kenn.

Contributor guide

Open the contributing guide

Research direction

Start with the BagState.isEmpty() and ReadableState example, then review the imported BEAM-2980 Jira issue for the missing context. Define a consistent specification for the returned value across state types, including when snapshots are required.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
data-engineering, distributed-systems
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.