Skip to content

branch-4.0: [fix](insert overwrite) delay overwrite partition routing until incremental open #63209#63263

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

branch-4.0: [fix](insert overwrite) delay overwrite partition routing until incremental open #63209#63263
github-actions[bot] wants to merge 1 commit into
branch-4.0from
auto-pick-63209-branch-4.0

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Cherry-picked from #63209

…mental open (#63209)

### What problem does this PR solve?

Problem Summary:

In auto-detect insert overwrite, BE sender could publish newly replaced
temporary partitions to local row routing before incremental open
finished on target BEs.

The race was:

1. One sender calls FE `replacePartition` and receives new temporary
partition/tablet metadata.
2. The sender records the new partition id and replaces local
`_vpartition` routing first.
3. Another concurrent batch can then route rows to the new tablet.
4. The first sender has not finished incremental open yet, so the target
BE may not have created the delta writer for that tablet.
5. The target BE returns `unknown tablet to append data`.

This PR makes the sender finish `_create_partition_callback`, including
incremental open/open_wait, before publishing the new partition/tablet
to local routing and marking the new partition as handled.
@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 100.00% (8/8) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 53.20% (19382/36435)
Line Coverage 36.30% (180832/498197)
Region Coverage 32.89% (140334/426679)
Branch Coverage 33.79% (60781/179896)

@hello-stephen
Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (8/8) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 70.00% (24967/35667)
Line Coverage 52.57% (261416/497285)
Region Coverage 50.31% (216794/430915)
Branch Coverage 51.46% (92882/180511)

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