Doris-Breakwater opened a new pull request, #66426:
URL: https://github.com/apache/doris/pull/66426

   ### What problem does this PR solve?
   
   Backport #66424 to `branch-4.1`.
   
   When two `TRUNCATE TABLE` operations race, a stale request can read the live 
table's `PartitionInfo` with an old partition ID after the winning request has 
replaced that partition. This can cause an NPE before the existing 
concurrent-change check returns the intended retryable `DdlException`.
   
   ### What is changed and how does it work?
   
   Use the copied table snapshot's `DataProperty` consistently while building 
replacement partitions. Add a deterministic unit test that forces two truncate 
operations through the race and verifies that the stale request receives the 
retryable error without deleting the winner's tablets.
   
   This commit was cherry-picked from #66424 with `-x`; the only conflict 
resolution was adapting imports to the `branch-4.1` test APIs.
   
   ### Check List
   
   - [x] `git diff --check`
   - [x] Independent code review completed with no findings
   - [ ] FE unit test executed locally (blocked before compilation because 
`thirdparty/installed/bin/protoc` is absent in the provided checkout)
   
   Issue Number: N/A
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to