private void visitAndUpdate(HttpRequest request, VisitorParameters parameters, boolean fullyApplied,
                                ResponseHandler handler, DocumentUpdate protoUpdate, String route) {
        visitAndProcess(request, parameters, fullyApplied, handler, route, (id, timestamp, operationParameters) -> {
            DocumentUpdate update = new DocumentUpdate(protoUpdate);
            // See `visitAndDelete()` for rationale for sending down a timestamp _and_ the original condition.
            if (timestamp != 0) {
                update.setCondition(TestAndSetCondition.ofRequiredTimestampWithSelectionFallback(
                        timestamp, protoUpdate.getCondition().getSelection()));
            } // else: use condition already set from protoUpdate
            update.setId(id);
            return asyncSession.update(update, operationParameters);
        });
    }
Called at the end of response rendering, before generic status data is written. Called from a dedicated thread pool.
vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java