feat(append): add bucketed append compact manager and coordinator tests#113
Open
lucasfang wants to merge 1 commit into
Open
feat(append): add bucketed append compact manager and coordinator tests#113lucasfang wants to merge 1 commit into
lucasfang wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a new bucket-aware append-only compaction manager implementation and adds unit tests intended to validate both the new manager behavior and the higher-level append compaction coordinator flow.
Changes:
- Added
BucketedAppendCompactManager(header + implementation) to manage bucketed append compaction tasks. - Added comprehensive unit tests for
BucketedAppendCompactManagerbehavior and cancellation/reset handling. - Added new
AppendCompactCoordinatorTestcoverage for partitioned/unpartitioned scenarios, validation, external paths, and schema evolution.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| src/paimon/core/append/bucketed_append_compact_manager.h | Declares the new bucketed append compaction manager and its task types. |
| src/paimon/core/append/bucketed_append_compact_manager.cpp | Implements triggering/picking logic, task submission, and result handling. |
| src/paimon/core/append/bucketed_append_compact_manager_test.cpp | Adds unit tests covering picking logic, cancellation, DV behavior, and AllFiles(). |
| src/paimon/core/append/append_compact_coordinator_test.cpp | Adds coordinator-level tests for compaction across partitions, validation, external path handling, and schema evolution. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+118
to
+125
| private: | ||
| static constexpr int32_t FULL_COMPACT_MIN_FILE = 3; | ||
|
|
||
| static bool IsOverlap(const std::shared_ptr<DataFileMeta>& o1, | ||
| const std::shared_ptr<DataFileMeta>& o2) { | ||
| return o2->min_sequence_number <= o1->max_sequence_number && | ||
| o2->max_sequence_number >= o1->min_sequence_number; | ||
| } |
| */ | ||
|
|
||
|
|
||
| #include "paimon/append/append_compact_coordinator.h" |
| std::shared_ptr<Executor> executor_; | ||
| }; | ||
|
|
||
| TEST_F(BucketedAppendCompactManagerTest, TestFileComparatorWithoutOverlap) { |
| ASSERT_FALSE(comparator(file3, file1)); | ||
| } | ||
|
|
||
| TEST_F(BucketedAppendCompactManagerTest, TestFileComparatorWithOverlap) { |
Comment on lines
+322
to
+324
| while (!cancellation_controller->IsCancelled()) { | ||
| std::this_thread::sleep_for(std::chrono::milliseconds(1)); | ||
| } |
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
Linked issue: No linked issue
This change adds bucketed append compact manager and coordinator test support.
Included changes:
BucketedAppendCompactManagerheader and implementation for managing bucketed append compaction tasksBucketedAppendCompactManagerAppendCompactCoordinatorTests
Test coverage included in this change:
BucketedAppendCompactManagerTestAppendCompactCoordinatorTestAPI and Format
No public API, storage format, or protocol changes.
Documentation
No documentation changes required.
Generative AI tooling
Migrate-by: Aone Copilot (Qwen3.7-Max)