memgraph/tests/unit
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
..
auth.cpp Implement leftover Auth queries 2018-08-14 13:00:39 +02:00
bolt_chunked_decoder_buffer.cpp Refactor network stack to use * instead of & 2018-09-03 20:20:42 +02:00
bolt_chunked_encoder_buffer.cpp Support streaming of Bolt results 2018-07-18 13:01:50 +02:00
bolt_common.hpp Support streaming of Bolt results 2018-07-18 13:01:50 +02:00
bolt_decoder.cpp Rename bolt::DecodedValue to bolt::Value 2018-07-24 15:59:20 +02:00
bolt_encoder.cpp Integrate auth checks into query execution 2018-08-22 11:44:09 +02:00
bolt_session.cpp Refactor network stack to use * instead of & 2018-09-03 20:20:42 +02:00
bolt_testdata.hpp Removed large bolt encoder test to reduce runtime. 2017-05-03 14:50:02 +02:00
CMakeLists.txt Add dgp integration test 2018-09-08 00:01:03 +01:00
communication_buffer.cpp Refactor network stack to use * instead of & 2018-09-03 20:20:42 +02:00
concurrent_id_mapper_distributed.cpp Use the same ClientPools in distributed 2018-03-01 17:14:59 +01:00
concurrent_id_mapper_single_node.cpp Add initial version of properties on disk 2018-05-10 17:58:38 +02:00
concurrent_map_access.cpp Const map/set iteration. 2017-10-12 16:35:39 +02:00
concurrent_map.cpp Clean SkipList up 2018-04-11 10:08:20 +02:00
counters.cpp Split database/counters into single node and distributed 2018-08-31 13:52:36 +02:00
cypher_main_visitor.cpp Remove is_query_cached from Context 2018-09-04 14:17:49 +02:00
database_key_index.cpp Move distributed transaction engine logic 2018-09-07 11:43:57 +02:00
database_label_property_index.cpp Move distributed transaction engine logic 2018-09-07 11:43:57 +02:00
database_master.cpp Split GraphDb to distributed and single node files 2018-07-20 10:48:38 +02:00
database_transaction_timeout.cpp Extract distributed interpretation out of Interpreter 2018-08-27 09:31:39 +02:00
datastructure_union_find.cpp Add parallel customers/Otto test 2017-11-23 09:20:53 +01:00
deferred_deleter.cpp Make gc more aggressive and optimise is_not_visible function 2017-10-06 10:07:55 +02:00
distributed_bfs.cpp Separate distributed implementation of GraphDbAccessor 2018-07-26 09:16:39 +02:00
distributed_common.hpp Move distributed transaction engine logic 2018-09-07 11:43:57 +02:00
distributed_coordination.cpp Ensure that the durability directory is unique 2018-09-03 13:40:10 +02:00
distributed_data_exchange.cpp Separate distributed implementation of GraphDbAccessor 2018-07-26 09:16:39 +02:00
distributed_dgp_partitioner.cpp Add dgp integration test 2018-09-08 00:01:03 +01:00
distributed_dgp_vertex_migrator.cpp Add dgp integration test 2018-09-08 00:01:03 +01:00
distributed_durability.cpp Move distributed transaction engine logic 2018-09-07 11:43:57 +02:00
distributed_gc.cpp Separate distributed implementation of GraphDbAccessor 2018-07-26 09:16:39 +02:00
distributed_graph_db.cpp Move distributed transaction engine logic 2018-09-07 11:43:57 +02:00
distributed_interpretation.cpp Clean-up TypedValue misuse 2018-09-13 13:45:54 +02:00
distributed_query_plan.cpp Move Parameters into EvaluationContext 2018-09-11 13:32:29 +02:00
distributed_reset.cpp Move distributed operators to its own file 2018-08-28 14:47:14 +02:00
distributed_serialization.cpp Clean-up TypedValue misuse 2018-09-13 13:45:54 +02:00
distributed_updates.cpp Add distributed Id Cypher function 2018-09-03 13:04:03 +02:00
durability.cpp Add magic number to WAL and fix version consistency check 2018-08-29 16:53:10 +02:00
dynamic_bitset.cpp Commit log gc 2018-04-04 10:25:25 +02:00
gid.cpp Change gid bit size 2017-12-28 11:04:52 +01:00
graph_db_accessor_index_api.cpp Separate distributed implementation of GraphDbAccessor 2018-07-26 09:16:39 +02:00
graph_db_accessor.cpp Separate distributed implementation of GraphDbAccessor 2018-07-26 09:16:39 +02:00
graph_db.cpp Separate distributed implementation of GraphDbAccessor 2018-07-26 09:16:39 +02:00
interpreter.cpp Clean-up TypedValue misuse 2018-09-13 13:45:54 +02:00
kvstore.cpp Implement leftover Auth queries 2018-08-14 13:00:39 +02:00
metrics.cpp Add some metric types and basic RPC server stats 2018-02-16 08:33:15 +01:00
mvcc_find_update_common.hpp Move distributed transaction engine logic 2018-09-07 11:43:57 +02:00
mvcc_find.cpp GC bugfixes, MVCC and transaction refactoring 2017-06-12 10:46:12 +02:00
mvcc_gc_common.hpp Move distributed transaction engine logic 2018-09-07 11:43:57 +02:00
mvcc_gc.cpp Move distributed transaction engine logic 2018-09-07 11:43:57 +02:00
mvcc_one_transaction.cpp Fix mvcc tests 2017-10-19 12:58:23 +02:00
mvcc_parallel_update.cpp Fix mvcc tests 2017-10-19 12:58:23 +02:00
mvcc.cpp Move distributed transaction engine logic 2018-09-07 11:43:57 +02:00
network_endpoint.cpp Rename NetworkEndpoint 2018-01-15 15:47:37 +01:00
network_timeouts.cpp Refactor network stack to use * instead of & 2018-09-03 20:20:42 +02:00
network_utils.cpp Extract utils into mg-utils static library and explicitly list tests 2018-05-30 09:41:56 +02:00
pod_buffer.cpp POD serialization, rocksdb integration and Gleich's optimization 2018-06-12 13:54:41 +02:00
property_value_store.cpp Use temporary durability directory in PVS unit test 2018-06-15 15:27:36 +02:00
query_common.hpp Clean-up TypedValue misuse 2018-09-13 13:45:54 +02:00
query_cost_estimator.cpp Clean-up TypedValue misuse 2018-09-13 13:45:54 +02:00
query_expression_evaluator.cpp Clean-up TypedValue misuse 2018-09-13 13:45:54 +02:00
query_plan_accumulate_aggregate.cpp Clean-up TypedValue misuse 2018-09-13 13:45:54 +02:00
query_plan_bag_semantics.cpp Clean-up TypedValue misuse 2018-09-13 13:45:54 +02:00
query_plan_common.hpp Implement single node two-sided BFS 2018-08-29 12:56:39 +02:00
query_plan_create_set_remove_delete.cpp Extract distributed create operators 2018-08-30 14:41:23 +02:00
query_plan_edge_cases.cpp Extract distributed interpretation out of Interpreter 2018-08-27 09:31:39 +02:00
query_plan_match_filter_return.cpp Clean-up TypedValue misuse 2018-09-13 13:45:54 +02:00
query_planner.cpp Extract distributed Expand 2018-08-30 14:43:01 +02:00
query_required_privileges.cpp Add required privileges for query to Results 2018-08-16 15:59:10 +02:00
query_semantic.cpp Remove boost from the codebase 2018-07-30 15:34:12 +02:00
query_variable_start_planner.cpp Separate distributed implementation of GraphDbAccessor 2018-07-26 09:16:39 +02:00
queue.cpp Add first version of message passing and rpc 2017-12-05 14:51:18 +01:00
record_edge_vertex_accessor.cpp Separate distributed implementation of GraphDbAccessor 2018-07-26 09:16:39 +02:00
ring_buffer.cpp Extract io/network into mg-io library 2018-05-30 14:58:41 +02:00
rpc_worker_clients.cpp Clean-up TypedValue misuse 2018-09-13 13:45:54 +02:00
rpc.cpp Replace boost with capnp in RPC 2018-06-04 10:45:12 +02:00
serialization.cpp Remove boost from the codebase 2018-07-30 15:34:12 +02:00
skiplist_access.cpp Const map/set iteration. 2017-10-12 16:35:39 +02:00
skiplist_gc.cpp Remove executor not run option 2017-12-18 14:36:15 +01:00
skiplist_position_and_count.cpp Replace debug_assert, permanent_assert with DCHECK/CHECK 2017-10-11 14:43:32 +02:00
skiplist_reverse_iteration.cpp Logger in this test somehow breaks code coverage. Argh... 2017-04-07 09:44:12 +02:00
skiplist_suffix.cpp Refactor GraphDb 2018-01-12 16:47:24 +01:00
socket.cpp Implement SSL support for servers and clients 2018-06-20 17:56:47 +02:00
state_delta.cpp Add distributed Id Cypher function 2018-09-03 13:04:03 +02:00
static_bitset.cpp Fix tests that expect debug_assert to fail 2017-08-07 16:38:15 +02:00
storage_address.cpp Support snapshot creation and recovery in distributed 2018-01-29 19:16:13 +01:00
stripped.cpp Split lexer and parser grammars 2018-07-26 10:33:25 +02:00
transaction_engine_distributed.cpp Move distributed transaction engine logic 2018-09-07 11:43:57 +02:00
transaction_engine_single_node.cpp Move distributed transaction engine logic 2018-09-07 11:43:57 +02:00
typed_value.cpp Separate distributed implementation of GraphDbAccessor 2018-07-26 09:16:39 +02:00
utils_algorithm.cpp Implement string functions 2018-07-02 10:39:11 +02:00
utils_demangle.cpp Extract utils into mg-utils static library and explicitly list tests 2018-05-30 09:41:56 +02:00
utils_exceptions.cpp Extract utils into mg-utils static library and explicitly list tests 2018-05-30 09:41:56 +02:00
utils_executor.cpp Extract utils into mg-utils static library and explicitly list tests 2018-05-30 09:41:56 +02:00
utils_on_scope_exit.cpp utils::auto_scope refactor 2017-08-11 09:43:10 +02:00
utils_rwlock.cpp Extract io/network into mg-io library 2018-05-30 14:58:41 +02:00
utils_scheduler.cpp Extract utils into mg-utils static library and explicitly list tests 2018-05-30 09:41:56 +02:00
utils_signals.cpp Extract utils into mg-utils static library and explicitly list tests 2018-05-30 09:41:56 +02:00
utils_string.cpp Remove keyword lowercasing from stripper 2018-07-19 17:08:45 +02:00
utils_thread_pool.cpp Extract io/network into mg-io library 2018-05-30 14:58:41 +02:00
utils_timestamp.cpp Extract utils into mg-utils static library and explicitly list tests 2018-05-30 09:41:56 +02:00
utils_watchdog.cpp Extract utils into mg-utils static library and explicitly list tests 2018-05-30 09:41:56 +02:00