Skip to content

feat: collation improvement at the tip of the chain#144

Open
alex-kulam wants to merge 1 commit into0xPolygon:release/3.2-developfrom
alex-kulam:feat/collation-workers-fix
Open

feat: collation improvement at the tip of the chain#144
alex-kulam wants to merge 1 commit into0xPolygon:release/3.2-developfrom
alex-kulam:feat/collation-workers-fix

Conversation

@alex-kulam
Copy link
Copy Markdown

A refactor in a prior commit restructured the worker-count assignment into initialCycle branches, accidentally leaving chain-tip mode (initialCycle=false) with only 1 collate/build worker instead of 4.
On high-throughput chains like Polygon PoS, a single collation worker cannot keep pace with block execution. Domain steps fall behind, MDBX accumulates unflushed state faster than it can be collated, and ReclaimableSpace grows unbounded.

Fix: SetCollateAndBuildWorkers and SetMergeWorkers are now set unconditionally (outside the initialCycle branch), restoring 4 collate and 2 merge workers in both initial-sync and chain-tip modes.
SetCompressWorkers retains the initialCycle distinction (full CPU during initial sync, capped at 2 at chain tip to avoid background I/O contention).

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.

1 participant