Implement KeystoreImplV2::insert

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Security
    • Server Security 2026-03-27
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When inserting a key without a set numerical ID, we will use the prev() method of an unpositioned WT cursor to find the largest key in the table, then increment it to ensure that we allocate strictly monotonically increasing IDs.

      Because there are two separate WiredTiger operations involved (prev followed by insert), this operation will need to run in a transaction, so a new
      bool WTDataStoreSession::runInTransaction(std::function<bool()> callbackFn)
      method will be introduced which will begin a transaction, run the passed-in callback function, and:

      • Commit the transaction if the function returns true, and return true
      • Rollback the transaction if the function returns false, and return false
      • Rollback the transaction if the function throws, and rethrow

            Assignee:
            Ken Martin
            Reporter:
            Gabriel Marks
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: