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

Reduce routing info refreshes on the mergeChunks path

    • Fully Compatible
    • v5.0, v4.4, v4.2, v4.0
    • Sharding EMEA 2021-05-31

       
      The current mergeChunks path is very inefficient because:

      It performs three sequential refreshes (router, shard-pre-merge and shard-post-merge)

      All this makes the mergeChunks command very expensive both from latency and from impact on the config server points of view.

      It would be much better if:

      • The router command:
        • Didn't do a refresh on entry, but relied on the cached information and the shardVersion (this has backwards compatibility implications)
      • The shard command (in order of importance):
        • Just checked the major shardVersion (for routing correctness, i.e., to make sure this shard owns that range)
        • Only did a refresh on the shard if the chunk bounds that the router sent didn't match with the cached info (this can only happen if a previous merge committed against the ConfigServer, but failed to refresh)

           

            Assignee:
            simon.gratzer@mongodb.com Simon Gratzer (Inactive)
            Reporter:
            simon.gratzer@mongodb.com Simon Gratzer (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: