private static String toString(Reindexing.State state) {
            switch (state) {
                case READY: return "ready";
                case RUNNING: return "running";
                case SUCCESSFUL: return "successful";
                case FAILED: return "failed";
                default: throw new IllegalArgumentException("Unexpected state '" + state + "'");
            }
        }
This lock must be held to manipulate reindexing state, or by whoever has a running visitor.
clustercontroller-reindexer/src/main/java/ai/vespa/reindexing/ReindexingCurator.java