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

   ### What problem does this PR solve?
   
   Issue Number: close #66273
   
   Related PR: None
   
   Problem Summary: When the optimizer reduces an INSERT INTO SELECT from a 
Table Stream to an empty relation, the previous empty-insert shortcut bypasses 
the transaction lifecycle. The target receives zero rows, but the stream offset 
is not committed, so the same stream state can be read repeatedly. Keep empty 
Table Stream reads in the transaction lifecycle, skip coordinator data 
execution, and commit the offset atomically. Ordinary empty inserts continue to 
use the existing fast-return path.
   
   ### Release note
   
   Table Stream offsets now advance when INSERT INTO SELECT succeeds with zero 
rows.
   
   ### Check List (For Author)
   
   - Test: Unit Test
       - InsertIntoTableCommandTableStreamTest and OlapInsertExecutorTest (21 
tests)
       - ./build.sh --fe -j 192
   - Behavior changed: Yes (successful zero-row Table Stream inserts now commit 
offsets; ordinary inserts are unchanged)
   - 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