Skip to content

[branch-4.0] [Opt](cloud) Support packed file for delete bitmap storage#61007

Open
liaoxin01 wants to merge 1 commit intoapache:branch-4.0from
liaoxin01:cherry-pick-60411-4.0
Open

[branch-4.0] [Opt](cloud) Support packed file for delete bitmap storage#61007
liaoxin01 wants to merge 1 commit intoapache:branch-4.0from
liaoxin01:cherry-pick-60411-4.0

Conversation

@liaoxin01
Copy link
Contributor

@liaoxin01 liaoxin01 commented Mar 3, 2026

pick:#60411

@liaoxin01 liaoxin01 requested a review from yiguolei as a code owner March 3, 2026 15:38
Copilot AI review requested due to automatic review settings March 3, 2026 15:38
@Thearas
Copy link
Contributor

Thearas commented Mar 3, 2026

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

)

Problem Summary:
This PR adds packed file support for delete bitmap storage in cloud
mode.
- Add packed file support for delete bitmap writer/reader
- Add write_file_cache flag to PackedAppendContext to control file cache
behavior
- Delete bitmap files do not use file cache to match original behavior
- Add regression tests for packed delete bitmap scenarios
@liaoxin01 liaoxin01 force-pushed the cherry-pick-60411-4.0 branch from cb27eb7 to 575a29d Compare March 3, 2026 15:43
@liaoxin01
Copy link
Contributor Author

run buildall

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Backports packed-file support for cloud-mode delete bitmap storage to branch-4.0, including persisting packed slice locations, reading/writing delete bitmaps from packed files, recycler cleanup logic, and regression coverage.

Changes:

  • Persist packed slice location for delete bitmap storage in metaservice protobuf and use it to read from packed files.
  • Add packed-file writer/reader support for delete bitmap files, including disabling file-cache writes for delete bitmaps.
  • Extend recycler cleanup to decrement packed-file ref counts for delete bitmap slices; add regression tests for packed delete bitmap scenarios.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
regression-test/suites/unique_with_mow_p0/cloud_delete_bitmap/test_packed_delete_bitmap.groovy Adds a dedicated regression suite covering packed delete bitmap behavior and BE restart scenarios.
regression-test/suites/unique_with_mow_p0/cloud_delete_bitmap/test_load.groovy Toggles enable_packed_file in an existing delete-bitmap load suite.
regression-test/suites/unique_with_mow_p0/cloud_delete_bitmap/test_cu_compaction.groovy Toggles enable_packed_file in an existing CU compaction suite.
regression-test/data/unique_with_mow_p0/cloud_delete_bitmap/test_packed_delete_bitmap.out Expected output for the new packed delete bitmap regression suite.
gensrc/proto/cloud.proto Extends DeleteBitmapStoragePB to persist packed_slice_location.
cloud/src/recycler/recycler.h Declares recycler helper for decrementing packed-file ref counts for delete bitmap slices.
cloud/src/recycler/recycler.cpp Implements delete bitmap packed-file refcount decrement and skips standalone delete-bitmap file deletion when packed.
be/src/io/fs/packed_file_manager.h Adds write_file_cache control to PackedAppendContext.
be/src/io/fs/packed_file_manager.cpp Honors write_file_cache when deciding whether to populate file cache for packed small files.
be/src/cloud/delete_bitmap_file_writer.h Adds packed-file-aware delete bitmap writer APIs and state.
be/src/cloud/delete_bitmap_file_writer.cpp Wraps delete bitmap writes in PackedFileWriter when enabled and surfaces packed slice location after close.
be/src/cloud/delete_bitmap_file_reader.h Adds a packed-slice-location-based constructor for reading delete bitmap from packed files.
be/src/cloud/delete_bitmap_file_reader.cpp Reads delete bitmap from packed files via PackedFileReader when packed location is present.
be/src/cloud/cloud_meta_mgr.cpp Writes packed slice location into DeleteBitmapStoragePB and selects packed vs standalone reader when loading delete bitmaps.
Comments suppressed due to low confidence (1)

cloud/src/recycler/recycler.cpp:3268

  • Logging delete bitmap not found, skip packed file ref count decrement at INFO in the recycler can become very noisy because many rowsets may not have any delete-bitmap entry. Recommend downgrading this to a verbose/debug log (or remove it) to avoid flooding logs during routine recycling.
        // No delete bitmap for this rowset, nothing to do
        LOG_INFO("delete bitmap not found, skip packed file ref count decrement")
                .tag("instance_id", instance_id_)
                .tag("tablet_id", tablet_id)
                .tag("rowset_id", rowset_id);

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@doris-robot
Copy link

Cloud UT Coverage Report

Increment line coverage 22.43% (48/214) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 79.15% (1788/2259)
Line Coverage 64.49% (31945/49534)
Region Coverage 65.31% (15983/24471)
Branch Coverage 55.88% (8503/15216)

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage `` 🎉
Increment coverage report
Complete coverage report

@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 5.56% (6/108) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.98% (19139/36124)
Line Coverage 36.18% (178244/492685)
Region Coverage 32.75% (138050/421523)
Branch Coverage 33.74% (59976/177753)

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.

5 participants