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

Add retry on rollback for insert cursor API call

      We are getting a rollback error in timestamp_abort for a simple cursor insert that is not in a transaction.

      It turns out that the API_TXN_CALL macro causes a transaction to be started in several cases, but for an insert it is conditional.  From bt_cursor.c:

          if (btree->type != BTREE_COL_FIX && __cursor_page_pinned(cbt, false) &&
            F_ISSET(cursor, WT_CURSTD_OVERWRITE) && !append_key) {
              WT_ERR(__wt_txn_autocommit_check(session)); 
                ...

      So for a non-overwrite cursor, we don't do the autocommit check, which is where the transaction would be started.  So, no transaction in this case, but we can still get WT_ROLLBACK due to eviction, and we should retry, as we do in non-transaction cases like WT-10133.

      The fix will be in the TXN_API_END macro and its variants.

       

      Here's the original error:

      recovery-stress-test-3 on rhel8-zseries

      Host: rhel83-z-3.dallasisv.build.10gen.cc
      Project: wiredtiger
      Commit: b4d08b19

      Task Logs:

      recovery-stress-test-3 task_log

      Logs:

      compilation commands
      if [ "$OS" = "Windows_NT" ]; then
      Link: https://evergreen.mongodb.com/task_log_raw/wiredtiger_rhel8_zseries_recovery_stress_test_3_b4d08b1931279a549b131219b9ab4d508b010d23_22_07_27_04_29_16/0?type=T#L164
      
      compilation commands
        # Use the Windows powershell script to execute Ninja build (can't execute directly in a cygwin environment).
      Link: https://evergreen.mongodb.com/task_log_raw/wiredtiger_rhel8_zseries_recovery_stress_test_3_b4d08b1931279a549b131219b9ab4d508b010d23_22_07_27_04_29_16/0?type=T#L165
      
      compilation commands
        powershell.exe '.\test\evergreen\build_windows.ps1 -build 1'
      Link: https://evergreen.mongodb.com/task_log_raw/wiredtiger_rhel8_zseries_recovery_stress_test_3_b4d08b1931279a549b131219b9ab4d508b010d23_22_07_27_04_29_16/0?type=T#L166
      
      compilation commands
      else
      Link: https://evergreen.mongodb.com/task_log_raw/wiredtiger_rhel8_zseries_recovery_stress_test_3_b4d08b1931279a549b131219b9ab4d508b010d23_22_07_27_04_29_16/0?type=T#L167
      
      compilation commands
        # Compiling with CMake generated Ninja file.
      Link: https://evergreen.mongodb.com/task_log_raw/wiredtiger_rhel8_zseries_recovery_stress_test_3_b4d08b1931279a549b131219b9ab4d508b010d23_22_07_27_04_29_16/0?type=T#L168
      
      compilation commands
        cd cmake_build
      Link: https://evergreen.mongodb.com/task_log_raw/wiredtiger_rhel8_zseries_recovery_stress_test_3_b4d08b1931279a549b131219b9ab4d508b010d23_22_07_27_04_29_16/0?type=T#L169
      
      compilation commands
        ninja -j $(echo $(grep -c ^processor /proc/cpuinfo) / 2 | bc) 2>&1
      Link: https://evergreen.mongodb.com/task_log_raw/wiredtiger_rhel8_zseries_recovery_stress_test_3_b4d08b1931279a549b131219b9ab4d508b010d23_22_07_27_04_29_16/0?type=T#L170
      
      compilation commands
      [1/536] Building C object CMakeFiles/wt_objs.dir/src/btree/bt_discard.c.o
      Link: https://evergreen.mongodb.com/task_log_raw/wiredtiger_rhel8_zseries_recovery_stress_test_3_b4d08b1931279a549b131219b9ab4d508b010d23_22_07_27_04_29_16/0?type=T#L171
      
      compilation commands
      [2/536] Building C object CMakeFiles/wt_objs.dir/src/btree/bt_handle.c.o
      Link: https://evergreen.mongodb.com/task_log_raw/wiredtiger_rhel8_zseries_recovery_stress_test_3_b4d08b1931279a549b131219b9ab4d508b010d23_22_07_27_04_29_16/0?type=T#L172
      
      compilation commands
      [3/536] Building C object CMakeFiles/wt_objs.dir/src/btree/bt_delete.c.o
      Link: https://evergreen.mongodb.com/task_log_raw/wiredtiger_rhel8_zseries_recovery_stress_test_3_b4d08b1931279a549b131219b9ab4d508b010d23_22_07_27_04_29_16/0?type=T#L173
      

      logs

            Assignee:
            donald.anderson@mongodb.com Donald Anderson
            Reporter:
            Xgen-BuildBaron-User xgen-buildbaron-user
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: