This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 4b817c6ae35 [fix](warmup) fix warm up jobs missing last batch (#53860)
4b817c6ae35 is described below
commit 4b817c6ae3548050963a30056fd85aa7908235e2
Author: Kaijie Chen <[email protected]>
AuthorDate: Tue Jul 29 14:52:56 2025 +0800
[fix](warmup) fix warm up jobs missing last batch (#53860)
### What problem does this PR solve?
Issue Number: DORIS-21591
Problem Summary:
1. `_pending_job_metas` may be cleared by a CLEAR_JOB request, so we
need to check it again.
2. We can not call pop_front before the job is finished, because
GET_CURRENT_JOB_STATE_AND_LEASE is relying on the pending job size.
---
be/src/cloud/cloud_warm_up_manager.cpp | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/be/src/cloud/cloud_warm_up_manager.cpp
b/be/src/cloud/cloud_warm_up_manager.cpp
index 510c677f06f..e7d26477b55 100644
--- a/be/src/cloud/cloud_warm_up_manager.cpp
+++ b/be/src/cloud/cloud_warm_up_manager.cpp
@@ -119,7 +119,9 @@ void CloudWarmUpManager::handle_jobs() {
_cond.wait(lock);
}
if (_closed) break;
- cur_job = _pending_job_metas.front();
+ if (!_pending_job_metas.empty()) {
+ cur_job = _pending_job_metas.front();
+ }
}
if (!cur_job) {
@@ -213,7 +215,13 @@ void CloudWarmUpManager::handle_jobs() {
{
std::unique_lock lock(_mtx);
_finish_job.push_back(cur_job);
- _pending_job_metas.pop_front();
+ // _pending_job_metas may be cleared by a CLEAR_JOB request
+ // so we need to check it again.
+ if (!_pending_job_metas.empty()) {
+ // We can not call pop_front before the job is finished,
+ // because GET_CURRENT_JOB_STATE_AND_LEASE is relying on the
pending job size.
+ _pending_job_metas.pop_front();
+ }
}
}
#endif
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]