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

Shard find commands get unnecessarily serialized by the ShardingState refresh rate limiting

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.2.12
    • Fix Version/s: 3.2.13
    • Component/s: Sharding
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Sharding 2017-04-17
    • Case:

      Description

      The find command implementation in 3.2 indiscriminately calls ShardingState::refreshMetadataIfNeeded even if no migrations or shard version mismatch has been found for the collection being queried.

      This is bad, because the refreshMetadataIfNeeded call is internally rate limited to at most 3 concurrent callers in order to not overwhelm the config server if refresh "is needed". However the rate limiting is done at the wrong place - where the in-memory check is done instead when the refresh from the config server is actually.

      This check should only be done if stale version has been hit and not on all occasions.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: