private PackConfig packConfig;
private ReftableConfig reftableConfig;
+ private boolean convertToReftable = true;
private long reftableInitialMinUpdateIndex = 1;
private long reftableInitialMaxUpdateIndex = 1;
return this;
}
+ /**
+ * @param convert
+ * if true, {@link #setReftableConfig(ReftableConfig)} has been
+ * set non-null, and a GC reftable doesn't yet exist, the garbage
+ * collector will make one by scanning the existing references,
+ * and writing a new reftable. Default is {@code true}.
+ * @return {@code this}
+ */
+ public DfsGarbageCollector setConvertToReftable(boolean convert) {
+ convertToReftable = convert;
+ return this;
+ }
+
/**
* Set minUpdateIndex for the initial reftable created during conversion.
*
}
private void writeReftable(DfsPackDescription pack) throws IOException {
- if (!hasGcReftable()) {
+ if (convertToReftable && !hasGcReftable()) {
writeReftable(pack, refsBefore);
return;
}