Fix write lock release in __checkpoint_prepare

XMLWordPrintableJSON

    • Storage Engines
    • 나비 (nabi) - 2024-04-16
    • 2

      checkpoint_prepare incorrectly releases a readlock in this error case:

        /* A checkpoint should never proceed when timestamps are out of order. */
        if (__wt_atomic_loadbool(&txn_global->has_oldest_timestamp) &&
           txn_global->oldest_timestamp > txn_global->stable_timestamp) {
               __wt_readunlock(session, &txn_global->rwlock);
      

      This should be a _wt_writeunlock not _wt_readunlock as that is the lock we are holding at the time.

              Assignee:
              Sean Watt
              Reporter:
              Sean Watt
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: