Skip to content

feat(append): add bucketed append compact manager and coordinator tests#113

Open
lucasfang wants to merge 1 commit into
apache:mainfrom
lucasfang:migrate
Open

feat(append): add bucketed append compact manager and coordinator tests#113
lucasfang wants to merge 1 commit into
apache:mainfrom
lucasfang:migrate

Conversation

@lucasfang

Copy link
Copy Markdown
Contributor

Purpose

Linked issue: No linked issue

This change adds bucketed append compact manager and coordinator test support.

Included changes:

  • Append Compact Module:
    • Adds BucketedAppendCompactManager header and implementation for managing bucketed append compaction tasks
    • Adds comprehensive test coverage for BucketedAppendCompactManager
    • Adds test coverage for AppendCompactCoordinator

Tests

Test coverage included in this change:

  • BucketedAppendCompactManagerTest
  • AppendCompactCoordinatorTest

API 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)

Copilot AI review requested due to automatic review settings June 25, 2026 03:14

Copilot AI left a comment

Copy link
Copy Markdown

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 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 BucketedAppendCompactManager behavior and cancellation/reset handling.
  • Added new AppendCompactCoordinatorTest coverage 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));
}
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.

2 participants