[BugFix] Fix stream load load_finish_time updated unexpected after transaction committed (backport #51174) #51265
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why I'm doing:
What I'm doing:
Fixes #issue
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check:
This is an automatic backport of pull request #51174 done by [Mergify](https://mergify.com). ## Why I'm doing: ``` mysql> select * from _statistics_.loads_history where label='stream_load_1726737200632_4eM'\G; *************************** 1. row *************************** id: 20038 label: stream_load_1726737200632_4eM profile_id: NULL db_name: ingestion_db table_name: duplicate_200_column_7CR user: root warehouse: NULL state: COMMITED progress: 0% type: STREAM_LOAD priority: NORMAL scan_rows: 0 scan_bytes: -1 filtered_rows: -1 unselected_rows: -1 sink_rows: -1 runtime_details: {"begin_txn_time_ms": 0, "client_ip": "172.26.93.220", "load_id": "6648aa87-3649-e16b-8446-79b1dbf473b5", "plan_time_ms": 0, "receive_data_time_ms": 0, "txn_id": 8234} create_time: 2024-09-19 17:13:20 load_start_time: NULL load_commit_time: NULL load_finish_time: 2024-09-19 17:13:46 properties: {"timeout": 3600} error_msg: NULL tracking_sql: select tracking_log from information_schema.load_tracking_logs where job_id=20038 rejected_record_path: NULL job_id: 20038 *************************** 2. row *************************** id: 20038 label: stream_load_1726737200632_4eM profile_id: NULL db_name: ingestion_db table_name: duplicate_200_column_7CR user: root warehouse: NULL state: FINISHED progress: 100% type: STREAM_LOAD priority: NORMAL scan_rows: 0 scan_bytes: 4849 filtered_rows: 0 unselected_rows: 0 sink_rows: 1 runtime_details: {"begin_txn_time_ms": 0, "client_ip": "172.26.93.220", "load_id": "6648aa87-3649-e16b-8446-79b1dbf473b5", "plan_time_ms": 8, "receive_data_time_ms": 0, "txn_id": 8234} create_time: 2024-09-19 17:13:20 load_start_time: NULL load_commit_time: NULL load_finish_time: 2024-09-19 17:16:10 properties: {"timeout": 3600} error_msg: tracking_sql: NULL rejected_record_path: NULL job_id: 20038 2 rows in set (0.02 sec) ```
What I'm doing:
Fixes #issue
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist: