feat: add configs for compaction and default target file size for different table#151
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces new/updated CoreOptions configurations related to file sizing and compaction behavior, including different default target file sizes depending on whether a table has a primary key.
Changes:
- Update
CoreOptions::GetTargetFileSizeto accepthas_primary_keyand derive different defaults for PK vs non-PK tables. - Add new compaction-related options (
commit.force-compact,compaction.min.file-num,compaction.force-rewrite-all-files) plus a computedGetCompactionFileSize. - Extend unit tests and option definitions/documentation to cover the new configs.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/paimon/core/io/data_file_meta.h | Comment wording update to use snake_case names. |
| src/paimon/core/core_options_test.cpp | Update tests for new GetTargetFileSize(bool) API and new compaction-related getters. |
| src/paimon/core/core_options.h | Change GetTargetFileSize signature and add new compaction-related getters. |
| src/paimon/core/core_options.cpp | Implement new defaults/derived sizes and parse new config keys. |
| src/paimon/common/defs.cpp | Register new Options::* string keys. |
| include/paimon/defs.h | Document newly added options. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
lxy-9602
reviewed
Feb 27, 2026
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.
Purpose
Update CoreOptions::GetTargetFileSize to accept has_primary_key and derive different defaults for PK vs non-PK tables.
Add new compaction-related options (commit.force-compact, compaction.min.file-num, compaction.force-rewrite-all-files) plus a computed GetCompactionFileSize. #93
Tests
API and Format
Documentation