Copilot commented on code in PR #64734:
URL: https://github.com/apache/doris/pull/64734#discussion_r3458406797
##########
be/src/cloud/cloud_warm_up_manager.cpp:
##########
@@ -472,6 +478,9 @@ Status CloudWarmUpManager::clear_job(int64_t job_id) {
std::lock_guard lock(_mtx);
Status st = Status::OK();
if (job_id == _cur_job_id) {
+ if (_cur_job_id != 0) {
+ g_file_cache_warm_up_job_num << -1;
+ }
_cur_job_id = 0;
Review Comment:
The inner check `if (_cur_job_id != 0)` is redundant because this block is
already guarded by `if (job_id == _cur_job_id)`, so `_cur_job_id` cannot be 0
here (since `job_id` is expected to represent a real job id). Consider removing
the nested condition and decrementing unconditionally in this branch to
simplify control flow.
--
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]