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

error in wt_txn_update_oldest verbose message test

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial - P5
    • Resolution: Done
    • None
    • WT2.8.0
    • None
    • None

    Description

      Michael, there's a trivial bug in txn.c:wt_txn_update_oldest, and I'm not sure enough of what's going on to just fix it. In this code:

      /* Update the oldest ID. */
      if (WT_TXNID_LT(prev_oldest_id, oldest_id) || last_running_moved) {
              /*
               * We know we want to update.  Check if we're racing.
               */
               ...
      } else {
              if (WT_VERBOSE_ISSET(session, WT_VERB_TRANSACTION) &&
                  current_id - oldest_id > 10000 && last_running_moved &&
                  oldest_session != NULL) {
                      (void)__wt_verbose(session, WT_VERB_TRANSACTION,
                          "old snapshot %" PRIu64
                          " pinned in session %d [%s]"
                          " with snap_min %" PRIu64 "\n",
                          oldest_id, oldest_session->id,
                          oldest_session->lastop,
                          oldest_session->txn.snap_min);
              }
              WT_ASSERT(session, txn_global->scan_count > 0);
              (void)__wt_atomic_subiv32(&txn_global->scan_count, 1);
      }
      

      The test for the verbose message can't ever fire because if last_running_moved was set, then we would have taken the previous code clause instead.

      Attachments

        Issue Links

          Activity

            People

              sue.loverso@mongodb.com Susan LoVerso
              keith.bostic@mongodb.com Keith Bostic (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: