Investigate and clarify cur_layered remove API code readability

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Storage Engines, Storage Engines - Foundations
    • SE Foundations - Q3+ Backlog
    • 5

      While reviewing the cur_layered remove API with jie.chen@mongodb.com, we realised that the current code is somewhat unreadable and difficult to understand.

      The confusion primarily arises from the use of the position keyword. Currently, position is set to true if the clayered is "positioned" (stable or ingest?). From a user perspective, the cursor is positioned; however, internally the logic becomes complex.

      For example:

      • On a follower, the cursor may be positioned on ingest, but then it needs repositioning on the ingest btree, and vice versa.
      • This makes the control flow and readability challenging to follow.

      Scope of this ticket:

      • Investigate the current API and its usage.
      • Identify where misunderstandings and confusion arise in the semantics of position.
      • Propose a clearer and more intuitive approach for both developers and users.

            Assignee:
            [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            Sid Mahajan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: