Skip to content

Conversation

@swjtu-zhanglei
Copy link
Contributor

@swjtu-zhanglei swjtu-zhanglei commented Aug 20, 2025

  • default txn_lazy_max_rowsets_per_batch is 1000, when RowsetMetaCloudPB size exceeds 10MB / 1000, fdb will refuse kv_txn, so we calculate batch size dynamically

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@hello-stephen
Copy link
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?

w41ter
w41ter previously approved these changes Aug 20, 2025
@swjtu-zhanglei
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions github-actions bot added approved Indicates a PR has been approved by one committer. reviewed labels Aug 20, 2025
@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@hello-stephen
Copy link
Contributor

Cloud UT Coverage Report

Increment line coverage 100.00% (11/11) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 83.67% (1409/1684)
Line Coverage 66.92% (24754/36992)
Region Coverage 67.90% (12332/18163)
Branch Coverage 57.68% (6509/11284)


// fdb txn limit 10MB, we use 4MB as the max size for each batch.
size_t max_rowsets_per_batch = config::txn_lazy_max_rowsets_per_batch;
if (max_rowset_meta_size > 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

4L << 20 / max_rowset_meta_size 这个表达是是错的 应该会先算 除法 再移位 .
这里最好加个syncpoint 用来观察 实际 max_rowset_meta_size 是多少, 在单测里通通过 syncpoint来 check 它的值

Copy link
Contributor Author

Choose a reason for hiding this comment

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

4L << 20 / max_rowset_meta_size 这个表达是是错的 应该会先算 除法 再移位 . 这里最好加个syncpoint 用来观察 实际 max_rowset_meta_size 是多少, 在单测里通通过 syncpoint来 check 它的值

done

@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Aug 20, 2025
@swjtu-zhanglei
Copy link
Contributor Author

run buildall

* default txn_lazy_max_rowsets_per_batch is 1000, when RowsetMetaCloudPB size exceeds `10MB / 1000`,
  fdb will refuse kv_txn, so we calculate batch size dynamically
@swjtu-zhanglei
Copy link
Contributor Author

run buildall

@swjtu-zhanglei
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

Cloud UT Coverage Report

Increment line coverage 100.00% (13/13) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 83.60% (1412/1689)
Line Coverage 66.87% (24817/37112)
Region Coverage 67.86% (12373/18232)
Branch Coverage 57.65% (6533/11332)

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Aug 22, 2025
@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

Copy link
Contributor

@dataroaring dataroaring left a comment

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 6951ab1 into apache:master Aug 25, 2025
27 of 28 checks passed
swjtu-zhanglei added a commit to swjtu-zhanglei/incubator-doris that referenced this pull request Aug 28, 2025
…pache#55035)

* default txn_lazy_max_rowsets_per_batch is 1000, when RowsetMetaCloudPB
size exceeds `10MB / 1000`, fdb will refuse kv_txn, so we calculate
batch size dynamically
swjtu-zhanglei added a commit to swjtu-zhanglei/incubator-doris that referenced this pull request Sep 2, 2025
…pache#55035)

* default txn_lazy_max_rowsets_per_batch is 1000, when RowsetMetaCloudPB
size exceeds `10MB / 1000`, fdb will refuse kv_txn, so we calculate
batch size dynamically
swjtu-zhanglei added a commit to swjtu-zhanglei/incubator-doris that referenced this pull request Sep 2, 2025
…pache#55035)

* default txn_lazy_max_rowsets_per_batch is 1000, when RowsetMetaCloudPB
size exceeds `10MB / 1000`, fdb will refuse kv_txn, so we calculate
batch size dynamically
dataroaring pushed a commit that referenced this pull request Sep 3, 2025
…55035) (#55574)

* default txn_lazy_max_rowsets_per_batch is 1000, when RowsetMetaCloudPB
size exceeds `10MB / 1000`, fdb will refuse kv_txn, so we calculate
batch size dynamically

### What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

### Release note

None

### Check List (For Author)

- Test <!-- At least one of them must be included. -->
    - [ ] Regression test
    - [x] Unit Test
    - [ ] Manual test (add detailed scripts or steps below)
    - [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
        - [ ] Previous test can cover this change.
        - [ ] No code files have been changed.
        - [ ] Other reason <!-- Add your reason?  -->

- Behavior changed:
    - [ ] No.
    - [ ] Yes. <!-- Explain the behavior change -->

- Does this need documentation?
    - [ ] No.
- [ ] Yes. <!-- Add document PR link here. eg:
apache/doris-website#1214 -->

### Check List (For Reviewer who merge this PR)

- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->
@morrySnow morrySnow mentioned this pull request Sep 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. dev/3.1.1-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants