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

Increment collection major version on chunk splits/merges

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.15, 4.0.13, 4.3.1, 4.2.2
    • Component/s: Sharding
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.2, v4.0, v3.6
    • Sprint:
      Sharding 2019-07-01, Sharding 2019-07-15, Sharding 2019-07-29
    • Case:

      Description

      On 3.6 and 4.0, we only increment the collection minor version when a chunk is split or merged. The original reasoning for this was to prevent unnecessary routing table refreshes on the routers, which don't ordinarily need to know about chunk splits (since they don't change targeting information).

      However, when a chunk split operation fails in 3.6, we refresh the routing table on the shard. When the routing table is refreshed, any shard whose shard version is less than the collection version will then have its shard version bumped. This means that on all but one shard (the shard whose shard version is equal to the collection version), this means that subsequent requests to that shard will trigger a refresh on the router anyways.

      In other words, only incrementing the minor version was not achieving its goal anyways, so it's safe to increment the major version instead.

      In the case of autosplitting triggered by routers, this is important in the case where the shard being targeted for a split is also the shard whose shard version is equal to the collection version, because a failed chunk split will not cause routers to refresh, and they will simply continue trying to split the same chunk over and over again until something else causes them to refresh.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: