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

Unnecessary API_SESSION_PUSH in SESSION_API_PREPARE_CHECK

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Transactions
    • StorEng - Defined Pipeline

      #define SESSION_API_PREPARE_CHECK(s, h, n)                     \
          do {                                                       \
              if ((s)->api_call_counter == 0) {                      \
                  int __prepare_ret;                                 \
                  API_SESSION_PUSH(s, WT_SESSION, n, NULL);          \
                  __prepare_ret = __wt_txn_context_prepare_check(s); \
                  API_SESSION_POP(s);                                \
                  WT_RET(__prepare_ret);                             \
              }                                                      \
          } while (0)
      

      I don't know why here we call API_SESSION_PUSH and immediately do API_SESSION_POP just for __wt_txn_context_prepare_check. I think this is unnecessary and can be removed.

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            chenhao.qu@mongodb.com Chenhao Qu
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: