Skip to content

[hotfix] Remove unused DurableExecutionManager.maybePruneState helper#682

Open
weiqingy wants to merge 1 commit into
apache:mainfrom
weiqingy:maybe-prune-state-cleanup-impl
Open

[hotfix] Remove unused DurableExecutionManager.maybePruneState helper#682
weiqingy wants to merge 1 commit into
apache:mainfrom
weiqingy:maybe-prune-state-cleanup-impl

Conversation

@weiqingy
Copy link
Copy Markdown
Collaborator

DurableExecutionManager.maybePruneState(Object, long) has no production callers and is not part of the ActionStatePersister interface — only a single test method references it. It is a leftover from the #546 refactor.

Timeline (from git log -S "maybePruneState"):

Changes:

  • Delete DurableExecutionManager.maybePruneState(Object, long).
  • Drop the dem.maybePruneState("k", 0L); line from the existing noStoreModeMakesAllMaybeOperationsNoOp no-op coverage test. The remaining maybe* no-op assertions still cover the null-store invariant for every maybe* method on the class today.

Documentation

  • doc-needed
  • doc-not-needed
  • doc-included

`DurableExecutionManager.maybePruneState(Object, long)` has no production
callers and is not part of the `ActionStatePersister` interface — only a
single test method references it. It is a leftover from the apache#546 refactor.

Timeline (from `git log -S "maybePruneState"`):
- apache#138 introduced `maybePruneState(...)` as a `private` helper on
  `ActionExecutionOperator`, called from the per-key completion path:
  `maybePruneState(key, sequenceNumber);`.
- apache#603 ("Fix prune state corner cases around checkpoints") deliberately
  removed both the call site and the helper. The fix moved pruning from
  the per-key path to the checkpoint-driven path inside
  `notifyCheckpointComplete`, where it now prunes using
  `lastCompletedSequenceNumber` captured at the checkpoint barrier via
  `snapshotLastCompletedSequenceNumbers`. That is the current/correct
  architecture.
- apache#546 ("Refactor ActionExecutionOperator into focused manager classes")
  extracted `DurableExecutionManager` and re-surfaced `maybePruneState(...)`
  on the new class — but no caller was re-added, correctly so. This commit
  removes the orphan.

Changes:
- Delete `DurableExecutionManager.maybePruneState(Object, long)`.
- Drop the `dem.maybePruneState("k", 0L);` line from the existing
  `noStoreModeMakesAllMaybeOperationsNoOp` no-op coverage test. The
  remaining `maybe*` no-op assertions still cover the null-store invariant
  for every `maybe*` method on the class today.
@github-actions github-actions Bot added doc-not-needed Your PR changes do not impact docs fixVersion/0.3.0 The feature or bug should be implemented/fixed in the 0.3.0 version. priority/major Default priority of the PR or issue. labels May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-not-needed Your PR changes do not impact docs fixVersion/0.3.0 The feature or bug should be implemented/fixed in the 0.3.0 version. priority/major Default priority of the PR or issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant