diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-05-14 13:12:42 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-05-14 13:12:42 +0200 |
commit | 6bca7c8fb40c81c4cb02790689fe94f37e233edf (patch) | |
tree | 80188c7c417b8bab76869ef85dd02d07c25d04ca /common/synchronizer.cpp | |
parent | d135fa0387672c10bad70b44867470affe1a3232 (diff) | |
download | sink-6bca7c8fb40c81c4cb02790689fe94f37e233edf.tar.gz sink-6bca7c8fb40c81c4cb02790689fe94f37e233edf.zip |
Avoid creating unnecessary rid mappings
Diffstat (limited to 'common/synchronizer.cpp')
-rw-r--r-- | common/synchronizer.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
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 | |||
184 | 184 | ||
185 | void Synchronizer::modify(const QByteArray &bufferType, const QByteArray &remoteId, const Sink::ApplicationDomain::ApplicationDomainType &entity) | 185 | void Synchronizer::modify(const QByteArray &bufferType, const QByteArray &remoteId, const Sink::ApplicationDomain::ApplicationDomainType &entity) |
186 | { | 186 | { |
187 | const auto sinkId = syncStore().resolveRemoteId(bufferType, remoteId); | 187 | const auto sinkId = syncStore().resolveRemoteId(bufferType, remoteId, false); |
188 | if (sinkId.isEmpty()) { | ||
189 | SinkWarningCtx(mLogCtx) << "Can't modify entity that is not locally existing " << remoteId; | ||
190 | return; | ||
191 | } | ||
188 | Storage::EntityStore store(mResourceContext, mLogCtx); | 192 | Storage::EntityStore store(mResourceContext, mLogCtx); |
189 | modifyIfChanged(store, bufferType, sinkId, entity); | 193 | modifyIfChanged(store, bufferType, sinkId, entity); |
190 | } | 194 | } |