Skip to content

branch-3.0: [opt](rowset meta) truncate segments key bounds if too large to avoid RowsetMetaCloudPB exceeds fdb's 100KB limits (#45287) - #51595

Merged
dataroaring merged 3 commits into
apache:branch-3.0from
bobhan1:branch-3.0-pick-45287
Jun 11, 2025
Merged

Conversation

@bobhan1

Copy link
Copy Markdown
Contributor

pick #45287

… `RowsetMetaCloudPB` exceeds fdb's 100KB limits (apache#45287)
In cloud mode, `RowsetMetaCloudPB` will be stored as a value in fdb.
Segment key bounds is a member of `RowsetMetaCloudPB`. When the key
columns has long data, segment key bounds may be very large, causing the
size of `RowsetMetaCloudPB` be larger than the fdb 100KB limit, and will
cause load txn fail when put `RowsetMetaCloudPB` KV in fdb.
This PR add a config `segments_key_bounds_truncation_threshold` to limit
the max length of segment key bounds to avoid the problem. Segment key
bounds which are larger than the value of this config will be truncated.
The config will take effect when rowset is generated(load/schema
change/compaction/snapshot).
**Note that as long as the config
`segments_key_bounds_truncation_threshold` has ever been turned on,
cluster downgrade and backup restore are not supported any more.**
@hello-stephen

Copy link
Copy Markdown
Contributor

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?

@bobhan1

Copy link
Copy Markdown
ContributorAuthor

run buildall

@doris-robot

Copy link
Copy Markdown

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage83.13% (1094/1316)
Line Coverage66.35% (18242/27492)
Region Coverage66.09% (9025/13655)
Branch Coverage55.95% (4884/8730)

@bobhan1

Copy link
Copy Markdown
ContributorAuthor

run buildall

@doris-robot

Copy link
Copy Markdown

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage83.13% (1094/1316)
Line Coverage66.38% (18248/27492)
Region Coverage66.07% (9022/13655)
Branch Coverage55.92% (4882/8730)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 86.73% (85/98) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage41.11% (10876/26455)
Line Coverage31.96% (93045/291161)
Region Coverage31.04% (48006/154646)
Branch Coverage27.53% (24603/89368)

@bobhan1

Copy link
Copy Markdown
ContributorAuthor

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage83.13% (1094/1316)
Line Coverage66.34% (18238/27492)
Region Coverage66.09% (9024/13655)
Branch Coverage55.90% (4880/8730)

@doris-robot

Copy link
Copy Markdown

BE UT Coverage Report

Increment line coverage 86.87% (86/99) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage41.10% (10874/26455)
Line Coverage31.95% (93012/291161)
Region Coverage31.02% (47974/154646)
Branch Coverage27.52% (24598/89368)

@bobhan1

Copy link
Copy Markdown
ContributorAuthor

run performance

1 similar comment
@bobhan1

Copy link
Copy Markdown
ContributorAuthor

run performance

@dataroaringdataroaring 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.

LGTM

@dataroaring
dataroaring merged commit 68d2127 into apache:branch-3.0Jun 11, 2025
@gavinchougavinchou mentioned this pull request Aug 15, 2025
Sign up for freeto 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.

4 participants

@bobhan1@hello-stephen@doris-robot@dataroaring