[#4803] State what the default sequencing policy actually does on DCB stores - #4811
Open
schananas wants to merge 1 commit into
Open
[#4803] State what the default sequencing policy actually does on DCB stores#4811schananas wants to merge 1 commit into
schananas wants to merge 1 commit into
Conversation
… stores `SequencingPolicy` named `SequentialPerAggregatePolicy` as the default when the wired default is `HierarchicalSequencingPolicy(SequentialPerAggregatePolicy, SequentialPolicy)`, and Spring's properties repeated the same wrong claim. On a DCB store the per-aggregate half resolves nothing, because only the aggregate-based storage engines publish that resource, so the fully-sequential fallback answers for every event: one sequence identifier, one segment, and every other segment idle whatever the configured segment and thread count. No behaviour is changed here, because a DCB event may carry several tags and keying on one of them would split two events that share a tag but differ in the others, losing their relative order. What was defective was the silence, so every place that stated the contract now states it correctly. The two added tests pin the measurement rather than a fix: they assert the default resolves one constant identifier and lands in one segment, so they turn red the day the default resolves per-entity on a DCB store. Fixes #4803
schananas
requested review from
hatzlj,
hjohn and
jangalinski
and removed request for
a team
July 29, 2026 11:45
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.
Fixes #4803
What changed
Documentation plus two pinning tests. No behaviour change, and that is deliberate -- see below.
SequencingPolicynamedSequentialPerAggregatePolicyas the default when the wired default isHierarchicalSequencingPolicy(SequentialPerAggregatePolicy, SequentialPolicy), and Spring'sEventProcessorPropertiesrepeated the same wrong claim. On a DCB store the per-aggregate half resolves nothing, because only the aggregate-based storage engines publishLegacyResources.AGGREGATE_IDENTIFIER_KEY, so the fully-sequential fallback answers every event: one sequence identifier, one segment, every other segment idle whatever the configured segment and thread count.Corrected at every place that stated the contract wrongly or incompletely:
SequencingPolicy,SequentialPerAggregatePolicy, theSimpleEventHandlingComponentfactory method that installs the default,EventProcessorProperties, and both the streaming and migration reference-guide pages, which are sharpened from "sequentially within a single segment" to the real claim that every other segment receives nothing.Why no behaviour change
A DCB event may carry several tags. Keying on one of them would put two events that share that tag but differ in the others into different sequences and lose their relative order. A single constant is the only safe fallback, so the throughput cliff is inherent to a safe default and the defect is the silence.
That argument is the thing to review hardest. The real question -- should a DCB store publish a per-entity resource the default policy can read? -- is a design decision for the framework owners and is stated in #4803 rather than answered here.
Tests
Two new cases in
SimpleEventHandlingComponentSequencingPolicyTest.DefaultSequencingPolicyWithoutAnAggregateIdentifier. Nothing can "fail without the fix" since no behaviour changed, so they were validated the other way: mutating the wired default's fallback fromSequentialPolicytoFullConcurrencyPolicyturns both red (Expected size: 1 but was: 3). They pin the measurement, so they go red the day the default starts resolving per-entity on a DCB store.messagingmodule green;extensions/spring/spring-boot-autoconfigurecompiles.Merge note
SimpleEventHandlingComponent.javaand its sequencing-policy test are also touched by #4797's branch, in different regions of each file. Both branch off the same base blobs, so whichever merges second should rebase rather than resolve by hand.