grib/src/main/java/ucar/nc2/grib/collection/GribCdmIndex.java
public static boolean updateGribCollection(boolean isGrib1, MCollection dcm,
      CollectionUpdateType updateType, FeatureCollectionConfig.PartitionType ptype,
      Logger logger, Formatter errlog) throws IOException {

    logger.debug("GribCdmIndex.updateGribCollection %s %s%n", dcm.getCollectionName(), updateType);
    if (!isUpdateNeeded(dcm.getIndexFilename(NCX_SUFFIX), updateType, (isGrib1 ? GribCollectionType.GRIB1 : GribCollectionType.GRIB2), logger)) return false;

    boolean changed;
    if (isGrib1) {  // existing case handles correctly - make seperate index for each runtime (OR) partition == runtime
      Grib1CollectionBuilder builder = new Grib1CollectionBuilder(dcm.getCollectionName(), dcm, logger);
      changed = builder.updateNeeded(updateType) && builder.createIndex(ptype, errlog);
    } else {
      Grib2CollectionBuilder builder = new Grib2CollectionBuilder(dcm.getCollectionName(), dcm, logger);
      changed = builder.updateNeeded(updateType) && builder.createIndex(ptype, errlog);
    }
    return changed;
  }
public static boolean updateGribCollection(boolean isGrib1, MCollection dcm,
      CollectionUpdateType updateType, FeatureCollectionConfig.PartitionType ptype,
      Logger logger, Formatter errlog) throws IOException {

    logger.debug("GribCdmIndex.updateGribCollection %s %s%n", dcm.getCollectionName(), updateType);
    if (!isUpdateNeeded(dcm.getIndexFilename(NCX_SUFFIX), updateType, (isGrib1 ? GribCollectionType.GRIB1 : GribCollectionType.GRIB2), logger)) return false;

    boolean changed;
    if (isGrib1) {  // existing case handles correctly - make seperate index for each runtime (OR) partition == runtime
      Grib1CollectionBuilder builder = new Grib1CollectionBuilder(dcm.getCollectionName(), dcm, logger);
      changed = builder.updateNeeded(updateType) && builder.createIndex(ptype, errlog);
    } else {
      Grib2CollectionBuilder builder = new Grib2CollectionBuilder(dcm.getCollectionName(), dcm, logger);
      changed = builder.updateNeeded(updateType) && builder.createIndex(ptype, errlog);
    }
    return changed;
  }
return true if changed, exception on failure