Skip to content

Fix zero key length panic in Prism#36983

Merged
shunping merged 4 commits intoapache:masterfrom
shunping:teststream-keyed-element
Dec 4, 2025
Merged

Fix zero key length panic in Prism#36983
shunping merged 4 commits intoapache:masterfrom
shunping:teststream-keyed-element

Conversation

@shunping
Copy link
Collaborator

@shunping shunping commented Dec 3, 2025

This PR mainly fixes the "zero key length" panic occurred in our tests.

  • First, it fixes the preprocessing of TestStream to preserve KV coder. This is necessary for the next step to retrieve key coder.
  • Second, it applies the same approach as Fix flaky Prism Loopback test #36927 to obtain key coder and add keyBytes when constructing pending elements in TestStream

In addition, it shows a concerning situation that a panic in watermark eval loop does not trigger a pipeline failure. To correct that, we change the order of two defer calls, so that the panic is handled before a premature channel closing.

Four tests are expected to fail and we will sickbay them for further investigation(tracking in #36984).

  • ParDoTest$BundleFinalizationTests.testBundleFinalizationWithState
  • ParDoTest$StateTests.testMapStateNoReadOnComputeIfAbsentAndPutIfAbsentInsertsElement
  • ParDoTest$TimerTests.testOutputTimestamp
  • ParDoTest$TimerTests.testOutputTimestampWithProcessingTime

@shunping shunping marked this pull request as ready for review December 3, 2025 21:37
@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2025

Assigning reviewers:

R: @lostluck for label go.

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

@shunping shunping merged commit c0a5895 into apache:master Dec 4, 2025
27 checks passed
@shunping shunping mentioned this pull request Dec 4, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants