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

Change lookaside file inserts to use cursor.insert

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 4.3.1, WT10.0.0, 4.2.2, 3.6.17, 4.0.15
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • 5
    • Storage Engines 2019-10-07
    • v4.0, v3.6

      The code to insert items into the lookaside table was changed from using WT_CURSOR.insert to using WT_CURSOR.update, with the expectation that WT_CURSOR.update would search any currently pinned leaf page before searching the tree. It was thought that would be a faster point update for the lookaside table as it's generally appending to a single page at the end of the tree.

      That wasn't correct. Because the lookaside insert code "sets" the key (using WT_CURSOR.set_key), any pinned page information is ignored, and a full tree search is performed.

      Because WT_CURSOR.insert holds resources for a shorter period than WT_CURSOR.update, we should switch back to using WT_CURSOR.insert, it should make lookaside table operations somewhat less resource intensive.

      See commit 30c226f.

            keith.bostic@mongodb.com Keith Bostic (Inactive)
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            0 Vote for this issue
            4 Start watching this issue