summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/engine/proto_rpc_adapter.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/searchlib/src/vespa/searchlib/engine/proto_rpc_adapter.cpp b/searchlib/src/vespa/searchlib/engine/proto_rpc_adapter.cpp
index 389a9ad3e2a..46f3ae0b4c7 100644
--- a/searchlib/src/vespa/searchlib/engine/proto_rpc_adapter.cpp
+++ b/searchlib/src/vespa/searchlib/engine/proto_rpc_adapter.cpp
@@ -114,8 +114,10 @@ struct SearchCompletionHandler : SearchClient {
ProtoConverter::search_reply_to_proto(*reply, msg);
encode_search_reply(msg, *req.GetReturn());
stats.reply_size = (*req.GetReturn())[2]._data._len;
- stats.latency = reply->request->getTimeUsed().sec();
- metrics.update_query_metrics(stats);
+ if (reply->request) {
+ stats.latency = reply->request->getTimeUsed().sec();
+ metrics.update_query_metrics(stats);
+ }
req.Return();
}
};
@@ -158,8 +160,10 @@ struct GetDocsumsCompletionHandler : DocsumClient {
ProtoConverter::docsum_reply_to_proto(*reply, msg);
encode_message(msg, *req.GetReturn());
stats.reply_size = (*req.GetReturn())[2]._data._len;
- stats.latency = reply->request->getTimeUsed().sec();
- metrics.update_docsum_metrics(stats);
+ if (reply->request) {
+ stats.latency = reply->request->getTimeUsed().sec();
+ metrics.update_docsum_metrics(stats);
+ }
req.Return();
}
};