diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-12-01 11:10:37 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-12-01 11:10:37 +0100 |
commit | 44edbee0f0b2fcf13e2ee388a90a8dd1f84a329e (patch) | |
tree | 71d265b2bce5a15981976e334ed182fa6d37c45f /tests/dummyresourcebenchmark.cpp | |
parent | 377c86144221ffc5b49bdaa9b8dcc3507fe4a50f (diff) | |
download | sink-44edbee0f0b2fcf13e2ee388a90a8dd1f84a329e.tar.gz sink-44edbee0f0b2fcf13e2ee388a90a8dd1f84a329e.zip |
Resolve remoteIds during sync
Remote id's need to be resolved while syncing any references.
This is done by the synchronizer by consulting the rid to entity id
mapping. If the referenced entity doesn't exist yet we create a local
id anyways, that we then need to pick up once the actual entity arrives.
Diffstat (limited to 'tests/dummyresourcebenchmark.cpp')
-rw-r--r-- | tests/dummyresourcebenchmark.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/dummyresourcebenchmark.cpp b/tests/dummyresourcebenchmark.cpp index 6eaf065..94a4e72 100644 --- a/tests/dummyresourcebenchmark.cpp +++ b/tests/dummyresourcebenchmark.cpp | |||
@@ -188,10 +188,11 @@ private Q_SLOTS: | |||
188 | static flatbuffers::FlatBufferBuilder fbb; | 188 | static flatbuffers::FlatBufferBuilder fbb; |
189 | fbb.Clear(); | 189 | fbb.Clear(); |
190 | //This is the resource buffer type and not the domain type | 190 | //This is the resource buffer type and not the domain type |
191 | auto entityId = fbb.CreateString(""); | ||
191 | auto type = fbb.CreateString("event"); | 192 | auto type = fbb.CreateString("event"); |
192 | // auto delta = fbb.CreateVector<uint8_t>(entityFbb.GetBufferPointer(), entityFbb.GetSize()); | 193 | // auto delta = fbb.CreateVector<uint8_t>(entityFbb.GetBufferPointer(), entityFbb.GetSize()); |
193 | auto delta = Akonadi2::EntityBuffer::appendAsVector(fbb, entityFbb.GetBufferPointer(), entityFbb.GetSize()); | 194 | auto delta = Akonadi2::EntityBuffer::appendAsVector(fbb, entityFbb.GetBufferPointer(), entityFbb.GetSize()); |
194 | auto location = Akonadi2::Commands::CreateCreateEntity(fbb, type, delta); | 195 | auto location = Akonadi2::Commands::CreateCreateEntity(fbb, entityId, type, delta); |
195 | Akonadi2::Commands::FinishCreateEntityBuffer(fbb, location); | 196 | Akonadi2::Commands::FinishCreateEntityBuffer(fbb, location); |
196 | } | 197 | } |
197 | } | 198 | } |