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

Sharding commonly uses write concern timeouts of 15 seconds and these are timing out in migration related operations and causing BFs

    • Fully Compatible
    • v4.0, v3.6
    • Sharding 2018-09-24, Sharding 2018-10-08
    • 25

      Sharding's writeConcern timeouts related to writes performed throughout the migration process should be bumped higher to prevent BFs. This write specifically caused the linked BF. Any other related writes that can be bumped without seriously affecting the rest of the system should be as well.

      Proposing a bump to 30 second timeouts rather than the 15 second timeout that's the norm in sharding.

      suggested fix

      as we have 20 different kMajorityWriteConcern values defined in the anonymous namespaces but most still connected we can add the durations to write_concern_options.h

          static constexpr Seconds kWriteConcernTimeoutSharding{30};
          static constexpr Seconds kWriteConcernTimeoutMigration{60};
          static constexpr Seconds kWriteConcernTimeoutUserCommand{60};
      

      and use as instead of

      const WriteConcernOptions kMajorityWriteConcern(WriteConcernOptions::kMajority,
                                                      WriteConcernOptions::SyncMode::UNSET,
                                                      Seconds(30));
      

      use

      const WriteConcernOptions kMajorityWriteConcern(WriteConcernOptions::kMajority,
                                                      WriteConcernOptions::SyncMode::UNSET,
                                                      WriteConcernOptions::kWriteConcernTimeoutSharding);
      

            Assignee:
            misha.tyulenev@mongodb.com Misha Tyulenev (Inactive)
            Reporter:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: