Feature #12671
openEnforce cache limit during dirfrag load during open_ino (during rejoin)
0%
Description
When clients replay requests referring to inodes not found in cache, the inode numbers are stashed for loading later (in MDCache::cap_imports).
Later, in MDCache::process_imported_caps (i.e. during rejoin), MDCache calls open_ino for these.
open_ino (and subsequently open_ino_traverse_dir) load the backtrace and traverse the parents, but for each dirfrag traversed, it is loaded if not complete.
The result is that if you have many large dirfrags, and some imported caps during rejoin, then it is possible for the MDS to aggressively exceed the usual cache size limit (trim() is never called during rejoin).
We need to either do some trimming at some point during this phase, or we need to make the open_ino procedure not force directories to be completely opened (by improving the CDir::fetch path to allow selective loading of dentries).