Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-8539

Correct description for statistic for rolling back oldest pinned.

    • v6.2, v6.0, v5.0, v4.4
    • Needed
    • Cloud, Triage and Release
    • We recently made a change to a wiredtiger statistic - renaming it to better reflect what it is actually tracking.

      The statistic "transaction failures due to history store" is misleading. It says transaction has failed because of history store, whereas it is counting the number of transactions that we rollback because of the cache pressure:

              if (!F_ISSET(conn, WT_CONN_RECOVERING) && __wt_cache_stuck(session)) {
                  ret = __wt_txn_is_blocking(session);
                  if (ret == WT_ROLLBACK) {
                      __wt_verbose_debug(
                        session, WT_VERB_TRANSACTION, "Rollback reason: %s", "Cache full");
                      --cache->evict_aggressive_score;
                      WT_STAT_CONN_INCR(session, txn_fail_cache);
      

      We increment the stat if the cache is stuck and we decide to rollback transaction because it is this transaction that is pinning the cache:

       */
      int
      __wt_txn_is_blocking(WT_SESSION_IMPL *session)
      {
          ....
      
          /*
           * Check if either the transaction's ID or its pinned ID is equal to the oldest transaction ID.
           */
          return (txn_shared->id == global_oldest || txn_shared->pinned_id == global_oldest ?
              __wt_txn_rollback_required(
                session, "oldest pinned transaction ID rolled back for eviction") :
              0);
      }
      

      It appears to me the statistic actually corresponds 1 - 1 to the rollback for the reason "oldest pinned transaction ID rolled back for eviction".

      Acceptance Criterion for the ticket:
      A change of description to something which makes more sense and correlates to the error we return to MongoDB "oldest pinned transaction ID rolled back for eviction"

            Assignee:
            sulabh.mahajan@mongodb.com Sulabh Mahajan
            Reporter:
            sulabh.mahajan@mongodb.com Sulabh Mahajan
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: