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

Ability to customize collection compression level

    • Type: Icon: New Feature New Feature
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.2.2
    • Component/s: None
    • None
    • Storage Engines

      At the moment, this setting is mentioned in the WiredTiger documentation: http://source.wiredtiger.com/mongodb-4.0/compression.html

      But it cannot be applied in real practice:

      coll_obj = db.create_collection("test", storageEngine={'wiredTiger': {'configString': 'block_compressor=zstd,compression_level=22'}})
      
      Traceback (most recent call last):
       File "/home/platon/_0_Диссертация/00_Скрипты/000_ld-tools-master/backend/create_intgen_db.py", line 184, in <module>
       create_intgen_db(client)
       File "/home/platon/_0_Диссертация/00_Скрипты/000_ld-tools-master/backend/create_intgen_db.py", line 141, in create_intgen_db
       'block_compressor=zstd,compression_level=22'}})
       File "/home/platon/miniconda3/lib/python3.7/site-packages/pymongo/database.py", line 411, in create_collection
       read_concern, session=s, **kwargs)
       File "/home/platon/miniconda3/lib/python3.7/site-packages/pymongo/collection.py", line 184, in __init__
       self.__create(kwargs, collation, session)
       File "/home/platon/miniconda3/lib/python3.7/site-packages/pymongo/collection.py", line 264, in __create
       collation=collation, session=session)
       File "/home/platon/miniconda3/lib/python3.7/site-packages/pymongo/collection.py", line 250, in _command
       user_fields=user_fields)
       File "/home/platon/miniconda3/lib/python3.7/site-packages/pymongo/pool.py", line 613, in command
       user_fields=user_fields)
       File "/home/platon/miniconda3/lib/python3.7/site-packages/pymongo/network.py", line 167, in command
       parse_write_concern_error=parse_write_concern_error)
       File "/home/platon/miniconda3/lib/python3.7/site-packages/pymongo/helpers.py", line 159, in _check_command_response
       raise OperationFailure(msg % errmsg, code, response)
      pymongo.errors.OperationFailure: 22: Invalid argument. [1579647776:829331][874:0x7f0f8cb3e700], wiredtiger_config_validate: config_check_search, 65: unknown configuration key: 'compression_level': Invalid argument.

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            platon.work@gmail.com Platon workaccount
            Votes:
            3 Vote for this issue
            Watchers:
            19 Start watching this issue

              Created:
              Updated:
              Resolved: