0AyanamiRei opened a new pull request, #65203:
URL: https://github.com/apache/doris/pull/65203

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Related PR: None
   
   Problem Summary:
   
   `INSERT INTO ... SELECT ...` runs synchronously, but users need to observe 
its load progress from another SQL session through `SHOW LOAD` by label. Before 
this change, the running insert load job/progress information was not 
registered early enough for `SHOW LOAD` to provide useful runtime visibility.
   
   This PR registers a running `InsertLoadJob` after transaction creation and 
sink finalization, initializes progress tracking after the job is registered, 
marks the job as `LOADING` during execution, and reuses the same job/statistics 
when the insert reaches `FINISHED` or `CANCELLED`. It also adds regression 
coverage for observing S3/TVF-source `INSERT INTO SELECT` runtime progress, 
including non-zero rows/bytes/file/backend details.
   
   ### Release note
   
   Support observing INSERT INTO SELECT load progress through SHOW LOAD.
   
   ### Check List (For Author)
   
   - Test <!-- At least one of them must be included. -->
       - [x] Regression test
           - `./run-regression-test.sh --run -d load_p0/insert -s 
test_show_load_insert_runtime_observation -c 
'jdbc:mysql://127.0.0.1:9035/?useLocalSessionState=true&allowLoadLocalInfile=true&zeroDateTimeBehavior=round'
 -ha 127.0.0.1:8035`
       - [x] Unit Test
           - `./run-fe-ut.sh --run 
org.apache.doris.load.loadv2.InsertLoadJobTest`
       - [x] Manual test (add detailed scripts or steps below)
           - `git diff --check HEAD~1..HEAD`
       - [ ] No need to test or manual test. Explain why:
           - [ ] This is a refactor/code format and no logic has been changed.
           - [ ] Previous test can cover this change.
           - [ ] No code files have been changed.
           - [ ] Other reason <!-- Add your reason?  -->
   
   - Behavior changed:
       - [ ] No.
       - [x] Yes. `SHOW LOAD` can observe running `INSERT INTO SELECT` load 
jobs by label, including progress and job details.
   
   - Does this need documentation?
       - [x] No.
       - [ ] Yes. <!-- Add document PR link here. eg: 
https://github.com/apache/doris-website/pull/1214 -->
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label <!-- Add branch pick label that this PR should 
merge into -->
   


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