gavinchou opened a new pull request, #63876: URL: https://github.com/apache/doris/pull/63876
## What Fix shutdown ordering in `TxnLazyCommitter` by explicitly stopping worker pools before member destruction can invalidate state used by worker callbacks. ## Why Lazy commit worker jobs keep a back pointer to `TxnLazyCommitter` and call back into `remove()`. They can also access the parallel commit pool and resource manager during `commit()`. With the default destructor, `running_tasks_`, `mutex_`, and `parallel_commit_pool_` are destroyed before `worker_pool_` is joined, which can lead to shutdown-time use-after-destruction. ## How - Add an explicit `TxnLazyCommitter` destructor. - Mark the committer as stopped before draining workers. - Stop and join the lazy commit worker pool before destroying task tracking state. - Stop the parallel commit pool after lazy workers are quiesced. - Make failed or post-shutdown submissions complete with an error instead of leaving waiters blocked. ## Tests - `sh format_code.sh cloud/src/meta-service/txn_lazy_committer.h` - `sh format_code.sh cloud/src/meta-service/txn_lazy_committer.cpp` - `sh run-cloud-ut.sh --run --fdb "fdb_cluster0:[email protected]:4500"` - Build passed. - `txn_lazy_commit_test` passed 24/24 in the full run. - The full run had unrelated storage vault/HDFS failures in `meta_service_test`. - After tightening the submit/shutdown race: - `sh run-cloud-ut.sh --run --fdb "fdb_cluster0:[email protected]:4500" --filter "txn_lazy_commit_test:*.*"` - Build passed; 22/24 passed, 2 tests failed due FDB `Timeout` while committing setup transactions. -- 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]
