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

Investigate replicating the collection WiredTiger config string during initial sync

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 4.4.15
    • 4.4.19, 5.0.15, 6.3.0-rc0, 6.0.5
    • None
    • None
    • Storage Execution
    • Minor Change
    • ALL
    • v6.2, v6.0, v5.0, v4.4
    • Execution Team 2023-01-23

    Description

      A customer has tried to add a mongod with encryption disabled to a replica set in which the other members have encryption enabled. When running getCollectionInfos() on the members of the replica set, some of the collections have the options.storageEngine.wiredTiger.configString option set. This string has "encryption=(keyid=\"admin\",name=AES256-CBC)" set as part of the complete option set. When new member initiates initial sync, it attempts to replicate the collection in its entirety, including the configString. WiredTiger then realizes the conflict between the collection and the mongod config settings and throws BadValue: 22: Invalid argument.

      This behavior can be replicated by manually setting the configString for a collection like this -

      db.createCollection(
      "users",
      { storageEngine: { wiredTiger: { configString: "access_pattern_hint=none,allocation_size=4KB,app_metadata=(formatVersion=1),assert=(commit_timestamp=none,read_timestamp=none),block_allocation=best,block_compressor=snappy,cache_resident=false,checksum=on,colgroups=,collator=,columns=,dictionary=0,encryption=(keyid=\"admin\",name=AES256-CBC),exclusive=false,extractor=,format=btree,huffman_key=,huffman_value=,ignore_in_memory_cache_size=false,immutable=false,internal_item_max=0,internal_key_max=0,internal_key_truncate=true,internal_page_max=4KB,key_format=q,key_gap=10,leaf_item_max=0,leaf_key_max=0,leaf_page_max=32KB,leaf_value_max=64MB,log=(enabled=false),lsm=(auto_throttle=true,bloom=true,bloom_bit_count=16,bloom_config=,bloom_hash_count=8,bloom_oldest=false,chunk_count_limit=0,chunk_max=5GB,chunk_size=10MB,merge_custom(prefix=,start_generation=0,suffix=),merge_max=15,merge_min=0),memory_page_image_max=0,memory_page_max=10m,os_cache_dirty_max=0,os_cache_max=0,prefix_compression=false,prefix_compression_min=4,source=,split_deepen_min_child=0,split_deepen_per_child=0,split_pct=90,type=file,value_format=u,type=file" }} })
      

      Initially investigated on a 4.4 mongod, have not verified whether this behavior has been fixed in a 5.0+ mongod.

      These strings have been seen set on system collections, which we do not believe were manually created using create.

      Because ESE is intended to be configured on a per-node basis, for upgrade/downgrade reasons, we do not expect these options to be replicated in the catalog. Nodes processing collections with these properties set should ignore the durable options and only respect the options defined in their configuration files.

      Attachments

        Issue Links

          Activity

            People

              yujin.kang@mongodb.com Yujin Kang Park
              shreyas.kalyan@mongodb.com Shreyas Kalyan
              Votes:
              9 Vote for this issue
              Watchers:
              22 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: