void (int currentId, int startingFileId) { String preRootFileName = vfsPeer.getName(currentId); int preRootIdFlags = vfsPeer.getFlags(currentId); int startingFileFlags = vfsPeer.getFlags(startingFileId); FSRecords.THROTTLED_LOG.info( () -> { //Check roots and cachedRoots are consistent IntOpenHashSet cachedRootsIds = new IntOpenHashSet(); for (VirtualFileSystemEntry cachedRoot : myIdToDirCache.getCachedRootDirs()) { cachedRootsIds.add(cachedRoot.getId()); } IntOpenHashSet rootIds = new IntOpenHashSet(); for (final VirtualFile root : PersistentFS.getInstance().getRoots()) { rootIds.add(((VirtualFileWithId)root).getId()); } int[] nonCachedRoots = rootIds.intStream() .filter(rootId -> !cachedRootsIds.contains(rootId)) .toArray(); int[] cachedNonRoots = cachedRootsIds.intStream() .filter(rootId -> !rootIds.contains(rootId)) .toArray(); int[] fsRootsNonPFSRoots = Arrays.stream(vfsPeer.listRoots()) .filter(rootId -> !rootIds.contains(rootId)) .toArray(); boolean fsRootsHasCurrentId = Arrays.stream(vfsPeer.listRoots()) .anyMatch(rootId -> rootId == currentId); StringBuilder nonCachedRootsPerLine = new StringBuilder(); if (LOG_NON_CACHED_ROOTS_LIST) { vfsPeer.forEachRoot((rootUrl, rootFileId) -> { if (myIdToDirCache.getCachedDir(rootFileId) == null) { String rootName = vfsPeer.getName(rootFileId); nonCachedRootsPerLine.append("\t" + rootFileId + ": [name:'" + rootName + "'][url:'" + rootUrl + "']\n"); } }); } return "file[" + startingFileId + ", flags: " + startingFileFlags + "]: " + "top parent (id: " + currentId + ", name: '" + preRootFileName + "', flags: " + preRootIdFlags + " parent: 0), " + "is still not in the idToDirCache. " + "path: " + parentIds + ", cachedRoots.size(=" + cachedRootsIds.size() + "), roots.size(=" + rootIds.size() + "), " + "pfs.roots.contains(" + currentId + ")=" + rootIds.contains(currentId) + ", " + "fs.roots.contains(" + currentId + ")=" + fsRootsHasCurrentId + ", " + "non-cached roots: " + nonCachedRoots.length + ", cached non-roots: " + cachedNonRoots.length + ", " + "FS roots not PFS roots: " + fsRootsNonPFSRoots.length + ": \n" + nonCachedRootsPerLine; } ); }