summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-04-20 21:20:49 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2020-04-20 21:20:49 +0000
commit2526a60f701a7b2fdd338ccabaa3d0ab669ca274 (patch)
treeae34d02bb947a13f88c5173694811ada9f64933b /storage
parentb327b31171346530a08e3acc88e36fd158e0f94d (diff)
Do not add empty children.
Diffstat (limited to 'storage')
-rw-r--r--storage/src/vespa/storage/distributor/operations/external/getoperation.cpp4
-rw-r--r--storage/src/vespa/storage/distributor/operations/external/twophaseupdateoperation.cpp4
2 files changed, 6 insertions, 2 deletions
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