Skip to content

fix(amp-worker-core): exclude hot files from compaction groups#1969

Open
Theodus wants to merge 1 commit intomainfrom
theodus/compaction
Open

fix(amp-worker-core): exclude hot files from compaction groups#1969
Theodus wants to merge 1 commit intomainfrom
theodus/compaction

Conversation

@Theodus
Copy link
Member

@Theodus Theodus commented Mar 12, 2026

Previously, the cooldown mechanism only prevented hot files (younger than cooldown_duration) from starting new compaction groups, but allowed them to be swept into existing groups started by cold files. This caused an incident where a recently-written backfill segment was compacted into a large file containing a reorg'd block, regressing dataset progress by millions of blocks.

Hot files are now fully excluded from compaction groups — they can neither start nor join any group until their cooldown period elapses.

Previously, the cooldown mechanism only prevented hot files (younger
than cooldown_duration) from starting new compaction groups, but allowed
them to be swept into existing groups started by cold files. This caused
an incident where a recently-written backfill segment was compacted into
a large file containing a reorg'd block, regressing dataset progress by
millions of blocks.

Hot files are now fully excluded from compaction groups — they can
neither start nor join any group until their cooldown period elapses.
@Theodus Theodus changed the title fix(amp-worker-core): exclude hot files from compaction groups entirely fix(amp-worker-core): exclude hot files from compaction groups Mar 12, 2026
@leoyvens
Copy link
Collaborator

Current behaviour is intentional. In the principle that if we're compacting then we might as well try to pack the group as optimally as possible.

If very recent files gen 0 should be excluded due to the reorg problem, that should imo have a specific mechanism for preventing compaction of recent files.

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.

2 participants