tdcommon/src/main/java/thredds/server/catalog/tracker/DatasetTrackerChronicle.java
public static void cleanupBefore(String pathname, long trackerNumber) {
    for (long tnum = trackerNumber - 1; tnum > 0; tnum--) {
      File oldDatabaseFile = new File(pathname + datasetName + "." + tnum);
      if (!oldDatabaseFile.exists()) break;
      if (oldDatabaseFile.delete()) {
        catalogInitLog.info("DatasetTrackerChronicle deleted {} ", oldDatabaseFile.getAbsolutePath());
      } else {
        catalogInitLog.error("DatasetTrackerChronicle not able to delete {} ", oldDatabaseFile.getAbsolutePath());
      }
    }
  }
public static void cleanupBefore(String pathname, long trackerNumber) {
    for (long tnum = trackerNumber - 1; tnum > 0; tnum--) {
      File oldDatabaseFile = new File(pathname + datasetName + "." + tnum);
      if (!oldDatabaseFile.exists()) break;
      if (oldDatabaseFile.delete()) {
        catalogInitLog.info("DatasetTrackerChronicle deleted {} ", oldDatabaseFile.getAbsolutePath());
      } else {
        catalogInitLog.error("DatasetTrackerChronicle not able to delete {} ", oldDatabaseFile.getAbsolutePath());
      }
    }
  }
public static void cleanupBefore ( String pathname , long trackerNumber ) { for ( long tnum = trackerNumber - 1 ; tnum > 0 ; tnum -- ) { File oldDatabaseFile = new File ( pathname + datasetName + "." + tnum ) ; if ( ! oldDatabaseFile . exists ( ) ) break ; if ( oldDatabaseFile . delete ( ) ) { catalogInitLog . info ( "DatasetTrackerChronicle deleted {} " , oldDatabaseFile . getAbsolutePath ( ) ) ; } else { catalogInitLog . error ( "DatasetTrackerChronicle not able to delete {} " , oldDatabaseFile . getAbsolutePath ( ) ) ; } } }
delete old databases
delete old databases