Jason Fehr has posted comments on this change. ( 
https://gerrit.cloudera.org/25364 )

Change subject: IMPALA-15612: Keep root user loads current between statestore 
updates
......................................................................


Patch Set 3:

(3 comments)

https://gerrit.cloudera.org/#/c/25364/1/be/src/scheduling/admission-controller.cc
File be/src/scheduling/admission-controller.cc:

https://gerrit.cloudera.org/#/c/25364/1/be/src/scheduling/admission-controller.cc@933
PS1, Line 933:   parent_->root_agg_user_loads_.increment(user);
> I checked the callers, and I think the lock is always held. The calls come
Withdrawn.  I checked again and could not find any path where that lock is not 
held.  I suspect I saw RemoteAdmissionControlClient::TryAdmitQuery() in the 
call path and thought it needed to hold admission_ctrl_lock_, but that function 
does not need to hold the lock since it calls to a remote host (where the 
remote host needs to hold the lock).


https://gerrit.cloudera.org/#/c/25364/1/be/src/scheduling/admission-controller.cc@941
PS1, Line 941:   parent_->root_agg_user_loads_.decrement(user);
> Same here. The callers are AdmissionController::ReleaseQuery(), WaitOnQueue
Withdrawn.  I checked again and confirmed all paths do indeed hold 
admission_ctrl_lock_.  I suspect I got confused between 
`AdmissionController::PoolStats::ReleaseQuery()`, 
`AdmissionControlService::ReleaseQuery()`, and 
`AdmissionController::ReleaseQuery()`.


https://gerrit.cloudera.org/#/c/25364/3/be/src/scheduling/admission-controller.cc
File be/src/scheduling/admission-controller.cc:

https://gerrit.cloudera.org/#/c/25364/3/be/src/scheduling/admission-controller.cc@2334
PS3, Line 2334: #ifndef NDEBUG
              :   // Between statestore updates root_agg_user_loads_ is 
maintained incrementally by
              :   // PoolStats::IncrementPerUser() and 
PoolStats::DecrementPerUser(), so it must still
              :   // equal the sum of the per-pool aggregates before they are 
recomputed below.
              :   AggregatedUserLoads expected_root_loads;
              :   for (auto& entry : pool_stats_) {
              :     expected_root_loads.add_loads(
              :         
entry.second.get_aggregated_user_loads().get_user_loads());
              :   }
              :   DCHECK(expected_root_loads.get_user_loads() == 
root_agg_user_loads_.get_user_loads())
              :       << "expected: " << expected_root_loads.DebugString()
              :       << " actual: " << root_agg_user_loads_.DebugString();
              : #endif
Has this code been run through ASAN/TSAN/UBSAN builds?  Those builds run a lot 
slower due to the extra instrumentation and frequently turn up timing issues.  
I'm concerned this change could be impacted by timing issues and cause those 
builds to be flaky.



--
To view, visit https://gerrit.cloudera.org/25364
To unsubscribe, visit https://gerrit.cloudera.org/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia1461f24762d5aa7e0f23991eea5a25da604a1d9
Gerrit-Change-Number: 25364
Gerrit-PatchSet: 3
Gerrit-Owner: Anubhav Jindal <[email protected]>
Gerrit-Reviewer: Anubhav Jindal <[email protected]>
Gerrit-Reviewer: Gokul Kolady <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Jason Fehr <[email protected]>
Gerrit-Reviewer: Yida Wu <[email protected]>
Gerrit-Comment-Date: Fri, 20 Nov 2026 18:05:21 +0000
Gerrit-HasComments: Yes

Reply via email to