Handle chunk metadata writes exceeding 16MB in writeCollectionMetadataLocally

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In writeCollectionMetadataLocally (commit_collection_metadata_locally.cpp), all chunk update operations are batched into a single UpdateCommandRequest to config.shard.catalog.chunks. Each chunk is upserted individually within the batch, but the entire set of UpdateOpEntry objects is sent as one command.

      If a collection has a very large number of chunks, the serialized update command can exceed the 16MB BSON document size limit, causing the write to fail.

            Assignee:
            Unassigned
            Reporter:
            Pol Pinol
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: