This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new 66d1c3344e2 [fix](warmup) fix warm up jobs missing last batch (#53860)
(#53861)
66d1c3344e2 is described below
commit 66d1c3344e26ff76159dccb67ab154cf978c1a65
Author: Kaijie Chen <[email protected]>
AuthorDate: Fri Jul 25 09:50:38 2025 +0800
[fix](warmup) fix warm up jobs missing last batch (#53860) (#53861)
### What problem does this PR solve?
Issue Number: DORIS-21591
Related PR: #53860
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.
### Release note
None
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [ ] Regression test
- [ ] Unit Test
- [ ] Manual test (add detailed scripts or steps below)
- [ ] 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.
- [ ] Yes. <!-- Explain the behavior change -->
- Does this need documentation?
- [ ] 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 -->
---
be/src/cloud/cloud_warm_up_manager.cpp | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/be/src/cloud/cloud_warm_up_manager.cpp
b/be/src/cloud/cloud_warm_up_manager.cpp
index f9a256d2b97..57e0a9ad275 100644
--- a/be/src/cloud/cloud_warm_up_manager.cpp
+++ b/be/src/cloud/cloud_warm_up_manager.cpp
@@ -186,7 +186,6 @@ void CloudWarmUpManager::handle_jobs() {
if (_closed) break;
if (!_pending_job_metas.empty()) {
cur_job = _pending_job_metas.front();
- _pending_job_metas.pop_front();
}
}
@@ -292,6 +291,13 @@ void CloudWarmUpManager::handle_jobs() {
{
std::unique_lock lock(_mtx);
_finish_job.push_back(cur_job);
+ // _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]