private void handleGuaranteedTasksChange(int guaranteedCount) {
    boolean doNotify = false;
    synchronized (actualState) {
      // A noop if we are in process of sending or if we have the correct value.
      if (actualState.sending != -1 || actualState.sent == guaranteedCount) return;
      actualState.sent = guaranteedCount;
      doNotify = actualState.target != guaranteedCount;
    }
    if (!doNotify) return;
    wmParent.notifyOfInconsistentAllocation(this);
  }
The actual state of the guaranteed task, and the update state, for the session.
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/WmTezSession.java