Add a batched write API to the direct-CRUD storage layer

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Execution
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Add a multi-key/value write entry point to the direct-CRUD storage APIs so that container writes can be applied as a batch rather than one storage call per key.

      Today KVEngineDirectCrudCursor (src/mongo/db/storage/kv/kv_engine.h:770-790) exposes only single-key insert, update and remove. There is no bulk entry point, so the oplog application side has nothing to call even though the oplog format already carries batches of keys (SERVER-130641, SERVER-130643, SERVER-131746). This ticket adds the API; SERVER-132072 consumes it.

      Scope

      • New batched method(s) on KVEngineDirectCrudCursor, threaded through storage_engine_direct_crud and implemented in WiredTigerKVEngine / wiredtiger_container.cpp.
      • Must honor the existing blind-write policy, which is sampled per cursor acquisition via KVEngine::chooseBlindWritePolicy (wiredtiger_kv_engine.cpp:489-497). For disaggregated storage, shouldUseBlindWriteWhenSafe is simply "not a primary" (disaggregated_persistence_provider.cpp:228-234), so on any non-primary the batch can be applied blind, with no read-before-write per key. This is what makes batched application cheaper on the apply side than on the primary.
      • Unit tests at the storage layer, independent of oplog application.

      Split out of SERVER-132072 so that the storage-layer API is reviewable on its own.

            Assignee:
            Unassigned
            Reporter:
            Alex Sarkesian
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: