Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-96199

FLE update to a document's shard key fails

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Security
    • ALL
    • Security 2024-11-11, Security 2024-12-09, Security 2025-01-20, Security 2025-03-17

      When a retryable update would update a document's shard key, we manually convert the update to a transaction with a delete and insert op (this feature was written prior to the existence of internal transactions). The stmtId in each write request will end up being populated with the default of '0' - in standard transactions stmtId doesn't matter. This becomes a problem when the original update is an FLE update however - FLE uses retryable internal transactions, where stmtIds do matter - the reuse of stmtId for the transaction will cause the entire update to fail.

      Potential options to fix this -

      • Change the code path for updates to a doc's shard key to use retryable internal transactions. There is code currently behind a failpoint to do this - the work was done as a part of the internal transactions project, and wasn't fully completed.
      • Change the current implementation of the code path for updates to a doc's shard key to set different stmtIds.

            Assignee:
            erwin.pe@mongodb.com Erwin Pe
            Reporter:
            janna.golden@mongodb.com Janna Golden
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: