Skip to content

fix(storage): split oversized compact blocks during recluster#19577

Open
zhyass wants to merge 2 commits intodatabendlabs:mainfrom
zhyass:feat_recluster
Open

fix(storage): split oversized compact blocks during recluster#19577
zhyass wants to merge 2 commits intodatabendlabs:mainfrom
zhyass:feat_recluster

Conversation

@zhyass
Copy link
Member

@zhyass zhyass commented Mar 19, 2026

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

This change adds split handling for compacted blocks in the recluster path to prevent oversized blocks from being
produced after sort and compaction. Previously, the output of recluster could retain blocks larger than expected,
which increased memory and I/O pressure.

The implementation reuses the common compact block pipeline and splits blocks when they exceed the configured
threshold. It also adds validation for the upper bound of block_size_threshold to avoid overly large settings. The
goal is to keep block size under control during recluster and reduce the impact of oversized blocks on serialization,
write path behavior, and resource usage.

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - Explain why

Type of change

  • Bug Fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • Breaking Change (fix or feature that could cause existing functionality not to work as expected)
  • Documentation Update
  • Refactoring
  • Performance Improvement
  • Other (please describe):

This change is Reviewable

@github-actions github-actions bot added the pr-bugfix this PR patches a bug in codebase label Mar 19, 2026
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 608736989d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@zhyass zhyass force-pushed the feat_recluster branch 3 times, most recently from 833cf48 to c4b8f26 Compare March 19, 2026 11:38
@zhyass
Copy link
Member Author

zhyass commented Mar 19, 2026

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c4b8f26ca7

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

fix

fix

fix

fix

fix

fix

fix

fix

fix
@zhyass
Copy link
Member Author

zhyass commented Mar 19, 2026

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Breezy!

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@zhyass zhyass requested a review from dantengsky March 19, 2026 14:34
@zhyass zhyass requested a review from SkyFan2002 March 19, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-bugfix this PR patches a bug in codebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants