private Reindexing deserialize(byte[] json) {
            return new Reindexing(SlimeUtils.entriesStream(SlimeUtils.jsonToSlimeOrThrow(json).get().field(STATUS))
                                            .filter(object -> require(TYPE, object, field -> types.hasDocumentType(field.asString()))) // Forget unknown documents.
                                            .collect(toUnmodifiableMap(object -> require(TYPE, object, field -> types.getDocumentType(field.asString())),
                                                                       object -> new Status(require(STARTED_MILLIS, object, field -> Instant.ofEpochMilli(field.asLong())),
                                                                                            get(ENDED_MILLIS, object, field -> Instant.ofEpochMilli(field.asLong())),
                                                                                            get(PROGRESS, object, field -> field.asString()),
                                                                                            require(STATE, object, field -> toState(field.asString())),
                                                                                            get(MESSAGE, object, field -> field.asString())))));
        }
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