Skip to content

feat: Logging and fsync delay for retention deletion (#27114)#27129

Merged
devanbenz merged 1 commit into1.12from
db/cherrypick-c836ac
Jan 16, 2026
Merged

feat: Logging and fsync delay for retention deletion (#27114)#27129
devanbenz merged 1 commit into1.12from
db/cherrypick-c836ac

Conversation

@devanbenz
Copy link
Copy Markdown

This area of the code is where we "hang" during retention policy deletion. It only occurs in very high cardinality dbs ~10 million+. DeleteSeriesID holds a mutex lock and does a fsync call. Running this millions of times + contention + disk I/O between various other writers/readers this could potentially go on for days.

This PR batches sync operations instead of running a sync during every series deletion op. It also adds additional logging to retention series deletion.

(cherry picked from commit c836ac2)

This area of the code is where we "hang" during retention policy deletion. It only occurs in very high cardinality dbs ~10 million+. DeleteSeriesID holds a mutex lock and does a fsync call. Running this millions of times + contention + disk I/O between various other writers/readers this could potentially go on for days.

This PR batches sync operations instead of running a sync during every series deletion op. It also adds additional logging to retention series deletion.

(cherry picked from commit c836ac2)
Copy link
Copy Markdown
Contributor

@davidby-influx davidby-influx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Cherry-pick

@devanbenz devanbenz merged commit 1420aaf into 1.12 Jan 16, 2026
9 checks passed
@devanbenz devanbenz deleted the db/cherrypick-c836ac branch January 16, 2026 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[port to 1.12] feat: Logging and fsync delay for retention deletion

2 participants