Layered cursor: avoid always opening the ingest cursor in OVERWRITE mode

XMLWordPrintableJSON

    • Storage Engines - Foundations
    • 1,220.045
    • None
    • None

      The ingest constituent cursor is currently always opened in WT_CURSTD_OVERWRITE mode (see the FIXME in __clayered_open_ingest, src/cursor/cur_layered.c) so that insert() can rewrite an ingest tombstone. A side effect is that layered writes cannot rely on the ingest constituent's native non-overwrite duplicate detection, so the write path performs an explicit pre-lookup before modifying the ingest table.

      Investigate inheriting the OVERWRITE setting from the application (top) cursor instead of forcing it on the ingest cursor, and using update() to place a value on top of an ingest tombstone. The main expected simplification: a non-overwrite write could lean on the constituent's own duplicate detection, removing the extra pre-lookup on the ingest write path.

      This is an exploratory cleanup; the duplicate-detection and tombstone-handling semantics need to be worked through before committing to the approach.

            Assignee:
            Ivan Kochin
            Reporter:
            Ivan Kochin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: