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

Remove TODO SERVER-28756 comment and continue disallowing transactions on the config database through mongos

    • Fully Compatible
    • Sharding NYC 2022-11-28

      SERVER-42114 had added a TODO SERVER-28756 comment to follow up after mongos stopped omitting the txnNumber field when writing to the config database. The special codepath ShardingCatalogClientImpl::writeConfigServerDirect() is what caused the txnNumber to be omitted from writes to the config database through mongos. SERVER-51070 removed the writeConfigServerDirect() function which had special retry logic for writes to the config database.

      After some internal discussion, we don't believe there is value to permit end users to run replica set transactions or cross-shard transactions on the config database through mongos. The remaining work for SERVER-28756 is to remove the TODO SERVER-28756 comment and continue disallowing transactions on the config database through mongos.

      // TODO SERVER-28756: Change allowTransactionsOnConfigDatabase to true once we fix the bug
      // where the mongos custom write path incorrectly drops the client's txnNumber.
      auto allowTransactionsOnConfigDatabase = false;
      validateSessionOptions(*_osi, command->getName(), nss, allowTransactionsOnConfigDatabase);
      

      Original title

      Remove the custom CSRS config server write retry logic

      Original description

      In order to support the continuous stepdown suite we implemented a custom write retry logic. Once retriable writes are supported by the server by default, this logic will no longer be necessary in all the places we put it and should be removed or at the very least consolidated within ShardRemote.

            Assignee:
            jason.zhang@mongodb.com Jason Zhang (Inactive)
            Reporter:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: