Avoid creating & seeking two RecordStore cursors in Express update-by-id

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Execution
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • 0

      For an update-by-id run through the express executor, we actually create and seek two WT cursors on the record store, not one. That is, we find the _id in the index, then seek to the corresponding RecordId a first time here, and then a second time when calling collection_internal::updateDocumentWithDamages (same for updateDocument()).

      It should be possible to avoid creating the second cursor here and re-using the existing one.

      Note that even if we re-use the cursor, WT will internally re-seek the cursor, though we should look into changing that as well.

      As part of this ticket we should also investigate whether a similar improvement is possible for deletes.

        1. base_patch.mongod.0.metrics.2025-06-17T21-49-36Z-00000
          454 kB
        2. base_patch.mongod.1.metrics.2025-06-17T21-49-37Z-00000
          370 kB
        3. base_patch.mongod.2.metrics.2025-06-17T21-49-36Z-00000
          370 kB
        4. exp_patch.mongod.0.metrics.2025-06-23T15-43-31Z-00000
          430 kB
        5. exp_patch.mongod.1.metrics.2025-06-23T15-43-31Z-00000
          343 kB
        6. exp_patch.mongod.2.metrics.2025-06-23T15-43-31Z-00000
          343 kB
        7. image-2025-06-30-19-11-16-747.png
          image-2025-06-30-19-11-16-747.png
          2.13 MB
        8. image-2025-06-30-19-12-29-979.png
          image-2025-06-30-19-12-29-979.png
          1.98 MB
        9. Screenshot-1.png
          Screenshot-1.png
          162 kB
        10. Screenshot-2.png
          Screenshot-2.png
          161 kB
        11. ycsb.yml
          4 kB

            Assignee:
            Ananya Patil
            Reporter:
            Ian Boros
            Votes:
            0 Vote for this issue
            Watchers:
            18 Start watching this issue

              Created:
              Updated: