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) {
                        session, WT_VERB_TRANSACTION, "Rollback reason: %s", "Cache full");
                      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:

      __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 ?
                session, "oldest pinned transaction ID rolled back for eviction") :

      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"

            sulabh.mahajan@mongodb.com Sulabh Mahajan
            sulabh.mahajan@mongodb.com Sulabh Mahajan
            1 Vote for this issue
            8 Start watching this issue