From 2526a60f701a7b2fdd338ccabaa3d0ab669ca274 Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Mon, 20 Apr 2020 21:20:49 +0000 Subject: Do not add empty children. --- .../vespa/storage/distributor/operations/external/getoperation.cpp | 4 +++- .../distributor/operations/external/twophaseupdateoperation.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'storage') diff --git a/storage/src/vespa/storage/distributor/operations/external/getoperation.cpp b/storage/src/vespa/storage/distributor/operations/external/getoperation.cpp index f800166a647..b59405a73cd 100644 --- a/storage/src/vespa/storage/distributor/operations/external/getoperation.cpp +++ b/storage/src/vespa/storage/distributor/operations/external/getoperation.cpp @@ -144,7 +144,9 @@ GetOperation::onReceive(DistributorMessageSender& sender, const std::shared_ptr< LOG(debug, "Received %s", msg->toString(true).c_str()); - _msg->getTrace().getRoot().addChild(getreply->getTrace().getRoot()); + if ( ! getreply->getTrace().getRoot().isEmpty()) { + _msg->getTrace().getRoot().addChild(getreply->getTrace().getRoot()); + } bool allDone = true; for (auto& response : _responses) { for (uint32_t i = 0; i < response.second.size(); i++) { diff --git a/storage/src/vespa/storage/distributor/operations/external/twophaseupdateoperation.cpp b/storage/src/vespa/storage/distributor/operations/external/twophaseupdateoperation.cpp index 4f49d89929f..2e6fe4020c2 100644 --- a/storage/src/vespa/storage/distributor/operations/external/twophaseupdateoperation.cpp +++ b/storage/src/vespa/storage/distributor/operations/external/twophaseupdateoperation.cpp @@ -643,7 +643,9 @@ TwoPhaseUpdateOperation::satisfiesUpdateTimestampConstraint(api::Timestamp ts) c void TwoPhaseUpdateOperation::addTraceFromReply(const api::StorageReply& reply) { - _trace.addChild(reply.getTrace().getRoot()); + if ( ! reply.getTrace().getRoot().isEmpty()) { + _trace.addChild(reply.getTrace().getRoot()); + } } void -- cgit v1.2.3