public void initializeIfEmpty(String cluster, List<Trigger> ready, Instant now) {
        if ( ! curator.exists(statusPath(cluster))) {
            try (Lock lock = lockReindexing(cluster)) {
                if (curator.exists(statusPath(cluster)))
                    return; // Some other node already did this.

                Reindexing reindexing = Reindexing.empty();
                for (Trigger trigger : ready)
                    if (trigger.readyAt().isBefore(now))
                        reindexing = reindexing.with(trigger.type(), Status.ready(now).running().successful(now));

                log.log(Level.INFO, "Creating initial reindexing status at '" + statusPath(cluster) + "'");
                writeReindexing(reindexing, cluster);
            }
            catch (ReindexingLockException ignored) {
                // Some other node took ownership and is doing this.
            }
        }
    }
If no reindexing data exists (has been wiped), assume current ready documents are already done.
clustercontroller-reindexer/src/main/java/ai/vespa/reindexing/ReindexingCurator.java