Skip to content

branch-4.0: [fix](auto partition) keep load row metrics monotonic for auto partition #64109#64135

Open
github-actions[bot] wants to merge 1 commit into
branch-4.0from
auto-pick-64109-branch-4.0
Open

branch-4.0: [fix](auto partition) keep load row metrics monotonic for auto partition #64109#64135
github-actions[bot] wants to merge 1 commit into
branch-4.0from
auto-pick-64109-branch-4.0

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Jun 5, 2026

Cherry-picked from #64109

…ion (#64109)

### What problem does this PR solve?

When loading into an auto partition table, BE may temporarily batch rows
whose target partitions do not exist yet. The previous logic first
incremented `doris_be_load_rows` when receiving the input block, then
decremented it when those rows were moved into the auto-partition
batching block, and finally incremented it again when the batched rows
were replayed after partition creation.

Because `doris_be_load_rows` is exposed as a counter, the negative
adjustment made the metric non-monotonic and could show row count drops
during auto partition loads.

This PR keeps the existing `RuntimeState` row compensation logic
unchanged, but stops applying negative deltas to the global BE load
row/byte metrics. It also skips global metric increments when replaying
the internal batched block, so each source row is counted once.
@github-actions github-actions Bot requested a review from morningman as a code owner June 5, 2026 06:15
@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?

@hello-stephen
Copy link
Copy Markdown
Contributor

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 0.00% (0/10) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 53.24% (19416/36469)
Line Coverage 36.38% (181334/498504)
Region Coverage 32.96% (140783/427147)
Branch Coverage 33.86% (60985/180088)

@hello-stephen
Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (10/10) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.48% (25519/35702)
Line Coverage 54.33% (270360/497621)
Region Coverage 51.96% (224190/431473)
Branch Coverage 53.36% (96432/180721)

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