From 6bca7c8fb40c81c4cb02790689fe94f37e233edf Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 14 May 2018 13:12:42 +0200 Subject: Avoid creating unnecessary rid mappings --- common/synchronizer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'common/synchronizer.cpp') diff --git a/common/synchronizer.cpp b/common/synchronizer.cpp index 1a5810d..51e53c8 100644 --- a/common/synchronizer.cpp +++ b/common/synchronizer.cpp @@ -184,7 +184,11 @@ void Synchronizer::modifyIfChanged(Storage::EntityStore &store, const QByteArray void Synchronizer::modify(const QByteArray &bufferType, const QByteArray &remoteId, const Sink::ApplicationDomain::ApplicationDomainType &entity) { - const auto sinkId = syncStore().resolveRemoteId(bufferType, remoteId); + const auto sinkId = syncStore().resolveRemoteId(bufferType, remoteId, false); + if (sinkId.isEmpty()) { + SinkWarningCtx(mLogCtx) << "Can't modify entity that is not locally existing " << remoteId; + return; + } Storage::EntityStore store(mResourceContext, mLogCtx); modifyIfChanged(store, bufferType, sinkId, entity); } -- cgit v1.2.3