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

Optimize `maxChunkSize` discovery/retrieval on config server

    • Type: Icon: Task Task
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Sharding EMEA 2022-05-02

      Following the introduction of the optional per-collection maxChunkSize in v5.1, when issuing moves the balancer has first to check whether a collection has a configured value or - if not - rely on the global value.

      This has led to a lot of inefficiency in discovering the max chunk size for a given collection since the catalog entry is continuously retrieved from disk when needing to balance (this happens for example when calling those functions).

      Moreover, with the modifications being done for the "no more auto splitter" project, the max chunk size is gaining more importance and needs to be retrieved/used in more parts in the code.

      Purpose of this ticket is to:

      • Allow to retrieve per-collection maxChunkSize from the balancer configuration rather than populating the code with plenty of calls to the catalog client. This can be as simple of offering a method that is retrieving the value from the catalog without the caller having to manually do it.

      A further optimization - that can be offloaded in a follow-up ticket if too complex - would be to make the balancer configuration keep track in-memory of per-collection and global chunk sizes, with those value being updated via observers when their state changes on disk.

       

            Assignee:
            allison.easton@mongodb.com Allison Easton
            Reporter:
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: