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

Make config.transactions a clustered collection

    • Service Arch
    • Fully Compatible
    • Service Arch 2023-10-16, Service Arch 2023-10-30, Service Arch 2023-11-13, Service Arch 2023-11-27, Service Arch 2023-12-11, Service Arch 2023-12-25, Service Arch 2024-01-08, Service Arch 2024-01-22, Service Arch 2024-02-05

      Original proposal:
      Currently every time we do a retryable write, we find the _id index for the config.transactions table, look up the record ID we want to write in it, and then update the record. But we know the _id will always be the session ID which does not change for a given TransactionParticipant, so we can cache that record ID on the participant the first time we insert or look it up, and skip the index lookup on most writes.

      We have to handle two exceptional cases

      1) The record ID no longer exists, e.g. because the session got reaped yet re-used.

      2) The record ID exists, but does not contain our _id value (the record ID got re-used). I don't know if this is possible with WiredTiger but I don't think we have formal guarantees against it.

      In both cases we would just fall back to the slow path of doing a lookup and possibly an insert.

      New proposal:
      Make the config.transactions collection clustered. This is a cleaner implementation but comes with upgrade/downgrade considerations.

            Assignee:
            james.bronsted@mongodb.com James Bronsted
            Reporter:
            matthew.russotto@mongodb.com Matthew Russotto
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: