-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Workload Resilience
-
WR Prioritized list
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Currently DeferredToken::get supports passing an AdmissionContext just for the IRRL case because we don't have an opCtx until we start queueing. Patrick bring's up an improved design:
{block}That being said, I think it would be easier to reason about all this if we standardize on how the AdmissionContext is passed in. My suggestion is to move IngressRequestAdmissionContext to be a member/decoration on Client rather than opCtx (similar to what we have for DeferredToken) so that way we have it available up front when we attempt to acquire the token. Then we don't need to accept it as an argument to any method on DeferredToken, since we'll either have it at that point or we won't.
Besides code cleanliness reasons, I think this is (going to be) important for statistic tracking, since for example if we can't get a DeferredToken due to the maxQueueDepth being exceeded, we'll want to markLoadShed on the admission context accordingly.{block}