Decouple AdmissionContext from execution control

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Service Arch
    • Fully Compatible
    • Service Arch 2024-03-18, Service Arch 2024-04-01
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The AdmissionContext class is currently a decoration on OperationContext that serves three purposes:

      • It holds the priority the operation should have upon admission.
      • It keeps track of the instant when the operation was last admitted (i.e. startProcessingTime).
        • This is used to track the duration of processing (i.e. the time during which the admission ticket was held).
      • It keeps track of how many times the operation went through admission.
        • This is used to keep track of how many different operations went through the admission mechanism (i.e. the totalNewAdmissions metric).

      There are several problems with this approach:

      • Sharing the same AdmissionContext across different admission mechanisms means that the metrics for it will be calculated incorrectly.
      • Using the startProcessingTime value to calculate the duration of processing does not take reentrancy into account.
      • Not all future admission control mechanisms will necessarily tie their admission metrics to the OperationContext.

      To solve this, we should:

      • move the startProcessingTime inside the ticket
      • make a decoration derived from AdmissionContext for each admission control mechanism that needs it

              Assignee:
              Vojislav Stojkovic
              Reporter:
              Vojislav Stojkovic
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: