Skip to content

feat: add configs for compaction and default target file size for different table#151

Merged
lxy-9602 merged 9 commits into
alibaba:mainfrom
lucasfang:compaction_dev
Feb 27, 2026
Merged

feat: add configs for compaction and default target file size for different table#151
lxy-9602 merged 9 commits into
alibaba:mainfrom
lucasfang:compaction_dev

Conversation

@lucasfang

@lucasfang lucasfang commented Feb 26, 2026

Copy link
Copy Markdown
Collaborator

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

Copilot AI review requested due to automatic review settings February 26, 2026 09:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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::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.
  • 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.

Comment thread src/paimon/core/core_options.h
Comment thread src/paimon/core/core_options.cpp
Comment thread src/paimon/core/core_options.cpp
Comment thread include/paimon/defs.h
Comment thread include/paimon/defs.h
Comment thread src/paimon/core/core_options.cpp Outdated
Comment thread src/paimon/core/core_options_test.cpp Outdated
Comment thread include/paimon/defs.h

@lxy-9602 lxy-9602 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

+1

@lxy-9602
lxy-9602 merged commit 9810a14 into alibaba:main Feb 27, 2026
8 checks passed
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.

3 participants