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

Update handling of create command in shouldRetryWithNetworkErrorOverride

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Storage Execution
    • Execution Team 2023-05-01, Execution Team 2024-06-10

      In jstests/libs/override_methods/network_error_and_txn_override.js, there is logic in the shouldRetryWithNetworkErrorOverride method such that, in the case where a create command returns an ok: 0 response with the NamespaceExists error code, the error is swallowed and ok: 1 is returned.
      The reasoning for this is so that the command can be safely retried in cases where it is unknown if it actually succeeded, due to encountering a network error.

      With the create command becoming idempotent on mongos as of SERVER-60064, the logic in this file should be updated to no longer override the ok value, since the command should now be safely retryable.

      The current behavior causes issues in test cases added in SERVER-60064 that expect NamespaceExists errors in cases where create is re-run with different options from the existing collection/view. The legitimate errors are incorrectly swallowed by this logic, which prevents the tests from being run in stepdown suites.

      Along with updating the override logic, we should remove the does_not_support_stepdowns tag from jstests/core/views/view_creation.js and jstests/core/ddl/create_collection.js.

            Assignee:
            Unassigned Unassigned
            Reporter:
            kaitlin.mahar@mongodb.com Kaitlin Mahar
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: