__wt_btcur_modify calls btcur_search even if the cursor is already positioned

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Engines, Storage Engines - Transactions
    • None
    • None
    • 0

      Summary

      Profiling around __wt_btcur_modify and noticed that this function calls btcur_search even if the cursor is already positioned. From a high level perspective, this means that when updating a row, we actually seek to it twice: once when we fetch it to apply a filter, and again when we actually decide to modify it.

      There is a large comment above discussing why we need the current value. Though, if the cursor was already positioned on the record we intend to modify as part of the same transaction, is it actually necessary to seek to that value again?

            Assignee:
            Unassigned
            Reporter:
            Ernesto Rodriguez Reina
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: