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

retryable writes trigger failCommands enabled only for `find`

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • ALL
    • Hide

      Configure a failCommand for `find`, specifying blockTimeMS and blockConnection: true:

      {
        configureFailPoint: 'failCommand',
        mode: { times: 1 },
        data: { failCommands: ['find'], blockConnection: true, blockTimeMS: 10_000 }
      }
      

      execute a retryable write and observe the command is delayed by blockTimeMS.

      disable retryable writes and observe that the command is instantaneous.

      Show
      Configure a failCommand for `find`, specifying blockTimeMS and blockConnection: true: { configureFailPoint: 'failCommand' , mode: { times: 1 }, data: { failCommands: [ 'find' ], blockConnection: true , blockTimeMS: 10_000 } } execute a retryable write and observe the command is delayed by blockTimeMS. disable retryable writes and observe that the command is instantaneous.

      FailCommands enabled only for the `find` command are activated by retryable writes because retryable writes send an internal find command against`config.transactions`, which activates the failCommand. This is visible to the write command if the failCommand is configured with blockTimeMS and blockConnection because the triggered failCommand blocks the find for blockTimeMS, which in turn blocks the write by blockTimeMS.

      As a potential fix, Max Hirschorn suggested:

      probably we should check in shouldActivateFailCommandFailPoint() for Client::isInDirectClient() and not activate the failpoint for the internal find command.

            Assignee:
            Unassigned Unassigned
            Reporter:
            bailey.pearson@mongodb.com Bailey Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: