From 277953489cbea507a52a50645b4fe7fbb591ad5a Mon Sep 17 00:00:00 2001 From: Michael Hackstein Date: Tue, 30 Aug 2016 15:37:26 +0200 Subject: [PATCH] Fixed now false checks on planId == 0 for SingleServer case. This is not true any more --- arangod/RestHandler/RestReplicationHandler.cpp | 6 +----- arangod/Utils/CollectionNameResolver.cpp | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/arangod/RestHandler/RestReplicationHandler.cpp b/arangod/RestHandler/RestReplicationHandler.cpp index d67bb94a97..eed626b13f 100644 --- a/arangod/RestHandler/RestReplicationHandler.cpp +++ b/arangod/RestHandler/RestReplicationHandler.cpp @@ -1361,11 +1361,7 @@ int RestReplicationHandler::createCollection(VPackSlice const& slice, planId = static_cast(StringUtils::uint64(tmp)); } - if (planId > 0) { - TRI_ASSERT(col->planId() == planId); - } else { - TRI_ASSERT(col->planId() == 0); - } + TRI_ASSERT(col->planId() == planId); if (dst != nullptr) { diff --git a/arangod/Utils/CollectionNameResolver.cpp b/arangod/Utils/CollectionNameResolver.cpp index 0bfa5dd34f..2cfda3dcaa 100644 --- a/arangod/Utils/CollectionNameResolver.cpp +++ b/arangod/Utils/CollectionNameResolver.cpp @@ -264,7 +264,7 @@ std::string CollectionNameResolver::localNameLookup(TRI_voc_cid_t cid) const { auto it = _vocbase->_collectionsById.find(cid); if (it != _vocbase->_collectionsById.end()) { - if ((*it).second->planId() == 0) { + if ((*it).second->planId() != (*it).second->cid()) { // DBserver local case name = (*it).second->name(); } else {