eldenmoon opened a new pull request, #70481:
URL: https://github.com/apache/doris/pull/70481

   ### What problem does this PR solve?
   
   Problem Summary: VARIANT batch finalization constructed an empty deque 
inside a noexcept cleanup helper. If Doris rejected that allocation, the 
exception terminated the backend before the scan or load error handler could 
report it. Move out the encoded metadata and destroy the scratch state 
directly. Limit the remaining swap-based cleanup to vectors, and roll back 
unindexed keys if key registration fails.
   
   ### Release note
   
   Prevent backend termination when memory limits are reached during VARIANT 
batch finalization.
   
   ### Check List (For Author)
   
   - Test: On the original affected release base, ASAN fault injection 
reproduced SIGABRT on the 64-byte cleanup allocation and detected stale 
metadata after failed key registration. The fix passed 161 related ASAN BE unit 
tests on that base. The two changed files are byte-identical on this master PR, 
and clang-format 16 and git diff --check passed.
   - Behavior changed: Yes. Finalization frees scratch memory without 
allocating, and key registration propagates allocation failures after rolling 
back the partial entry.
   - Does this need documentation: No
   


-- 
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