{{ message }}
fix: inline first page fanout to eliminate extra Pulsar round-trip#298
Closed
Ouriel wants to merge 1 commit into
Closed
fix: inline first page fanout to eliminate extra Pulsar round-trip#298Ouriel wants to merge 1 commit into
Ouriel wants to merge 1 commit into
Conversation
…TagFanout The first page of workflow IDs is now fetched and fanned out inline during the initial message processing. ContinueWorkflowTagFanout self-messages are only produced when there are additional pages (nextCursor != null). This eliminates the extra Pulsar round-trip for tags with fewer IDs than fanoutPageSize (the common case), and reduces the volume of ContinueWorkflowTagFanout messages that break the batch fast-path. Refs infiniticio#297
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Refs #297 — Eliminates the unconditional
ContinueWorkflowTagFanoutself-message that was causing a performance regression in v0.18.3.Problem
In v0.18.3, all tag-based fanout operations (
SendSignalByTag,CancelWorkflowByTag, etc.) unconditionally produce aContinueWorkflowTagFanoutmessage back to the topic before doing any work. This adds an extra Pulsar round-trip for every operation, even when the tag has a single workflow ID.Production metrics showed: 82ms → 7,084ms avg processing time (86x regression), 10,851 in-flight messages backlog.
Fix
The first page of workflow IDs is now fetched and fanned out inline during the initial message processing.
ContinueWorkflowTagFanoutis only produced when there are additional pages (nextCursor != null).Before:
After:
For tags with fewer IDs than
fanoutPageSize(the common case), noContinueWorkflowTagFanoutis produced at all. Pagination for large tags still works via continuations for subsequent pages.What was tested
All existing tests updated and passing (10/10). Tests verify: