Ensure reading of consistent config.collections and config.chunks when refreshing the CatalogCache

XMLWordPrintableJSON

    • Fully Compatible
    • Sharding 2021-03-22
    • 126
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Currently, when the ConfigServerCatalogCache refreshes, it first issues a majority read on config.collections and after that it issues a second majority read on config.chunks Because of this, the collection metadata we read from config.collections may not be consistent with the chunks (and thus collection version) we read from config.chunks.

      To address this we need to ensure that we read config.collections and config.chunks 'as a package'. To do so, we can use an aggregation pipeline on config.collections that has a $lookUp stage from config.chunks, and attach a snapshot read concern.

            Assignee:
            Jordi Serra Torrens
            Reporter:
            Jordi Serra Torrens
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: