ExportXMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Btree, Cursors
    • Storage Engines, Storage Engines - Foundations
    • 595.21
    • None
    • None

      Summary

      Expose WiredTiger's internal normalized-position (npos) functionality through the public cursor API.

      Background

      • src/btree/bt_npos.c already implements:
        • __wt_page_npos(): the approximate position of a page in the tree, as a fraction in [0, 1].
        • __wt_page_from_npos() and its read and eviction wrappers: the page at a given position.
      • Eviction and rollback-to-stable progress reporting use them internally.
      • The public API has no equivalent. Applications that need approximate split points or positions use random cursors or full scans instead.
      • Immediate consumer: Parallel Query partition points (SPM-4885, SERVER-137812).

      Request

      Make the existing functionality available to applications, so that they can:

      • Position a cursor at the record at an approximate normalized position.
      • Get the approximate normalized position of a positioned cursor.
      • Preferably, get a page-boundary key for a position without reading the leaf page.

      The implementation and API review decide the API shape, naming, options, and supported object types.

      Constraints

      • Positions are approximate. They may change as pages split or are evicted, and are not meant to be persisted.
      • No on-disk format change.
      • Existing behaviour and existing internal callers do not change.

      Acceptance

      • A public API, documented in wiredtiger.h.in and the docs.
      • Supported at least on row-store file: and table: objects.
      • Tests covering ordering, round trip, and boundary behaviour.
      • A Python binding.

            Assignee:
            Yury Ershov
            Reporter:
            Wei Hu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: