Skip to content

Conversation

@bobhan1
Copy link
Contributor

@bobhan1 bobhan1 commented Jun 25, 2025

pick #41232

@Thearas
Copy link
Contributor

Thearas commented Jun 25, 2025

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 bobhan1 force-pushed the branch-3.1-pick-41232 branch 2 times, most recently from b9a8ba3 to 076cc95 Compare June 25, 2025 08:17
…f newly inserted rows in partial update (apache#41232)

Currently, Doris use strict mode to decide if newly inserted rows should
be appended or report an error in partial update, which is hard to use.
This PR add a new session variable and load property
`partial_update_new_key_behavior` to control the behavior of newly
inserted rows in partial update.
`partial_update_new_key_behavior` has ~three~ two options:
- `APPEND`: append the newly inserted rows
- ~`IGNORE`: delete the newly inserted rows silently(will not be taken
into filtered rows)~
- `ERROR`: report error if meet newly inserted rows, and the error msg
will contains one row's keys which is not in table.

---
The reason for not supporting `IGNORE` mode: To support `IGNORE` mode,
we need to add delete sign for newly inserted rows in partial update to
delete them rather than use delete bitmap mark to delete them because
compaction will not use delete bitmap when reading data. Also, we need
to record the rows whose delete sign is added by us in this situation
for resolving conflicts in publish phase to avoid wrongly delete the
rows if there are another concurrent load insert some of these rows
successfully. This increases code complexity and is error-prone.

Doc: apache/doris-website#2472
@bobhan1 bobhan1 force-pushed the branch-3.1-pick-41232 branch 6 times, most recently from 8121191 to ba24c72 Compare June 25, 2025 11:11
@bobhan1 bobhan1 force-pushed the branch-3.1-pick-41232 branch from ba24c72 to eb6e9da Compare June 25, 2025 11:17
@morrySnow
Copy link
Contributor

run buildall

@hello-stephen
Copy link
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 83.43% (1128/1352)
Line Coverage 67.20% (19626/29207)
Region Coverage 66.95% (9687/14470)
Branch Coverage 56.88% (5267/9260)

@bobhan1 bobhan1 closed this Jul 4, 2025
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.

4 participants