Show storage engine config in mongosh

67 views Asked by At

I've created a collection (in Java) with storage engine options where the block compressor should be zstd. How can I verify that .storageEngineOptions() worked as expected? Is it possible through mongosh?

1

There are 1 answers

0
Charchit Kapoor On BEST ANSWER

You can use the function db.collection.stats(). You will get a large output, we are interested in creationString key, which is a large string, something like this:

creationString: 'access_pattern_hint=none,allocation_size=4KB,app_metadata=(formatVersion=1),assert=(commit_timestamp=none,durable_timestamp=none,read_timestamp=none,write_timestamp=off),block_allocation=best,block_compressor=snappy 

The compression algorithm will be a part of this string.