Collection "bytes currently in the cache" bigger than actual collection size

Hi,

I am trying to build an image of the Wired Tiger cache usage using the collStats on each collection by looking at:

  • collStats.wiredTiger.cache.bytes currently in the cache - total size of cache (dirty & clean)
  • collStats.wiredTiger.cache.tracked dirty bytes in the cache - dirty cache usage

Then I calculate the clean_bytes by subtracting tracked dirty bytes in the cache from collStats.wiredTiger.cache.tracked dirty bytes in the cache

And still in some cases, I see that the clean_bytes size larger than the collection collStats.size

I hope someone will have an explaination of this behavior.

Thanks,
Jafar