What is image_collection in config db

How the image_collection works with findAndModify. Is this affect CPU performance of the secondary.

Hey :wave: @ram_Kumar3,

Thank you for reaching out to the MongoDB Community forums!

The config.image_collection is used for storing the retryable findAndModify images. Starting from MongoDB 5.1 onwards, when the storeFindAndModifyImagesInSideCollection feature is enabled, primaries processing a retryable findAndModify will write a document to this collection rather than the oplog.

It may affect CPU and other resources of the node, however this will highly depend on the workload. The best way to know for sure with regard to your specific case is to experiment with your expected workload, and compare the node’s resource consumption with this feature enabled or disabled.

Hope it answers your questions. In case you have any further questions please feel free to reach out to us.

Best regards,
Kushagra

1 Like

Thanks @Kushagra_Kesav
How does the config.image_collection collection work and what is its behavior?

Hello @ram_Kumar3,

In MongoDB 5.1 onwards, this collection is used to store the pre-image and post-image of a document, to put less burden on the oplog. However, this is the implementation details that may change from time to time without any further notice.

May I ask if you are seeing any issues specifically due to this particular implementation? If so, please provide additional details so that we can better understand the issue.

Best regards,
Kushagra

2 Likes