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

Check the top-chunk before refreshing the local metadata

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.0.0-rc0
    • Affects Version/s: None
    • Component/s: Sharding
    • Labels:
      None
    • Fully Compatible
    • Sharding EMEA 2022-04-04, Sharding EMEA 2022-04-18
    • 45

      The identification of the range containing the top-chunk is performed by the shard after committing the split to the config server and after refreshing the local metadata. That logic needs to access the collection data, so it instantiates an AutoGetCollection to lock on the collection. As the local shard version might be updated as a consequence of the metadata refresh, it could no longer match with the shard version sent by the router. In this case, AutoGetCollection would throw a stale config error causing the splitChunk command to fail.

      A simple solution to resolve the problem is to anticipate the identification of the range containing the top-chunk before refreshing the local metadata.

            Assignee:
            antonio.fuschetto@mongodb.com Antonio Fuschetto
            Reporter:
            antonio.fuschetto@mongodb.com Antonio Fuschetto
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: