Skip to content

Fix NDE when multiple patches in a single WFT exceed SA's 2048-byte limit#1225

Merged
mjameswh merged 2 commits intomasterfrom
sdkcore-patch-exceeds-sa-max-size
Apr 21, 2026
Merged

Fix NDE when multiple patches in a single WFT exceed SA's 2048-byte limit#1225
mjameswh merged 2 commits intomasterfrom
sdkcore-patch-exceeds-sa-max-size

Conversation

@mjameswh
Copy link
Copy Markdown
Contributor

@mjameswh mjameswh commented Apr 20, 2026

What changed

On replay, when emitting the TemporalChangeVersion search attributes following emitting patch marker, we would previously include all known patches, including those that had been looked ahead but not yet emitted by the workflow code.

That could result in situations where we'd hit the SA's 2048 bytes size limit earlier in replay if 1) multiple patches were emitted during a single WFT, and 2) the SA's 2048 bytes limit was reached during that WFT. That situation would surface as an NDE, as the original execution would have emitted an UpseartSearchAttribute command for the first few patches, only stopping once the cumulative length of patches would exceed the limit, while on replay, there would be no UpseartSearchAttribute command at all.

This PR change the Patch->UpseartSearchAttribute handling to only include patches that the workflow has effectively emitted so far (created_command == true).

Fixes #1223.

@mjameswh mjameswh requested a review from a team as a code owner April 20, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Patch's UpsertSearchAttribute command may result in NDE if payload size exceeds 2KB

2 participants