public synchronized boolean isValid() {
    if (Files.exists(PersistentUtil.getCorruptionMarkerFile())) {
      try {
        ProjectUtil.clearCachesForAllProjectsStartingWith(SQLITE_VCS_LOG_DB_FILENAME_PREFIX);
      }
      catch (Throwable e) {
        LOG.error(e);
      }

      boolean deleted = FileUtil.deleteWithRenaming(PersistentUtil.LOG_CACHE);
      if (!deleted) {
        // if we could not delete caches, ensure that corruption marker is still there
        Path corruptionMarkerFile = PersistentUtil.getCorruptionMarkerFile();
        try {
          Files.createFile(NioFiles.createParentDirectories(corruptionMarkerFile));
        }
        catch (Exception e) {
          LOG.warn(e);
        }
      }
      else {
        LOG.info("Deleted Vcs Log caches at " + PersistentUtil.LOG_CACHE);
      }
      return deleted;
    }
    return true;
  }
public synchronized boolean isValid()