@VisibleForTesting
  public static @NotNull Supplier<@NotNull InvertedNameIndex> asyncFillInvertedNameIndex(@NotNull PersistentFSRecordsStorage recordsStorage) {
    CompletableFuture<InvertedNameIndex> fillUpInvertedNameIndexTask = PersistentFsConnectorHelper.INSTANCE.executor().async(() -> {
      InvertedNameIndex invertedNameIndex = new InvertedNameIndex();
      // fill up nameId->fileId index:
      int maxAllocatedID = recordsStorage.maxAllocatedID();
        for (int fileId = FSRecords.ROOT_FILE_ID; fileId <= maxAllocatedID; fileId++) {
          int flags = recordsStorage.getFlags(fileId);
          int nameId = recordsStorage.getNameId(fileId);
          if (!hasDeletedFlag(flags) && nameId != NULL_NAME_ID) {
            invertedNameIndex.updateDataInner(fileId, nameId);
          }
        }
      LOG.info("VFS scanned: file-by-name index was populated");
      return invertedNameIndex;
    });

    // We don't need volatile/atomicLazy, since computation is idempotent: same instance returned always.
    // So _there could be_ a data race, but it is a benign race.
    return () -> {
      try {
        return fillUpInvertedNameIndexTask.join();
      }
      catch (Throwable e) {
        throw new IllegalStateException("Lazy invertedNameIndex computation is failed", e);
      }
    };
  }
@VisibleForTesting
  public static @NotNull Supplier<@NotNull InvertedNameIndex> asyncFillInvertedNameIndex(@NotNull PersistentFSRecordsStorage recordsStorage)