memgraph/tests
Marin Tomic b5cdf6b476 Clean-up TypedValue misuse
Summary:
In a bunch of places `TypedValue` was used where `PropertyValue` should be. A lot of times it was only because `TypedValue` serialization code could be reused for `PropertyValue`, only without providing callbacks for `VERTEX`, `EDGE` and `PATH`. So first I wrote separate serialization code for `PropertyValue` and put it into storage folder. Then I fixed all the places where `TypedValue` was incorrectly used instead of `PropertyValue`. I also disabled implicit `TypedValue` to `PropertyValue` conversion in hopes of preventing misuse in the future.

After that, I wrote code for `VertexAccessor` and `EdgeAccessor` serialization and put it into `storage` folder because it was almost duplicated in distributed BFS and pull produce RPC messages. On the sender side, some subset of records (old or new or both) is serialized, and on the reciever side, records are deserialized and immediately put into transaction cache.

Then I rewrote the `TypedValue` serialization functions (`SaveCapnpTypedValue` and `LoadCapnpTypedValue`) to not take callbacks for `VERTEX`, `EDGE` and `PATH`, but use accessor serialization functions instead. That means that any code that wants to use `TypedValue` serialization must hold a reference to `GraphDbAccessor` and `DataManager`, so that should make clients reconsider if they really want to use `TypedValue` instead of `PropertyValue`.

Reviewers: teon.banek, msantl

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1598
2018-09-13 13:45:54 +02:00
..
benchmark Move Parameters into EvaluationContext 2018-09-11 13:32:29 +02:00
concurrent Refactor network stack to use * instead of & 2018-09-03 20:20:42 +02:00
distributed Remove raft from the codebase 2018-07-30 14:14:10 +02:00
drivers Integrate driver tests with Apollo 2018-08-22 18:31:37 +02:00
feature_benchmark Add kafka benchmark 2018-08-29 16:35:31 +02:00
integration Add dgp integration test 2018-09-08 00:01:03 +01:00
macro_benchmark Implement single node two-sided BFS 2018-08-29 12:56:39 +02:00
manual Clean-up TypedValue misuse 2018-09-13 13:45:54 +02:00
property_based Separate distributed implementation of GraphDbAccessor 2018-07-26 09:16:39 +02:00
public_benchmark Update LDBC query implementation 2018-07-10 10:08:21 +02:00
qa Add support for distributed tck tests 2018-08-01 10:51:49 +02:00
stress Rename bolt::DecodedValue to bolt::Value 2018-07-24 15:59:20 +02:00
unit Clean-up TypedValue misuse 2018-09-13 13:45:54 +02:00
apollo_runs.py Optimize Apollo build process 2018-05-16 14:52:27 +02:00
client-stress.sh Migrate command line args to gflgs in tests 2017-07-06 13:54:12 +02:00
CMakeLists.txt Add kafka benchmark 2018-08-29 16:35:31 +02:00