memgraph/tests/unit
Teon Banek 2c50ea41d5 Split GraphDb to distributed and single node files
Summary:
This change, hopefully, simplifies the implementation of different kinds
of GraphDb. The pimpl idiom is now simplified by removing all of the
crazy inheritance. Implementations classes are just plain data stores,
without any methods. The interface classes now have a more flat
hierarchy:

```
    GraphDb (pure interface)
         |
    +----+---------- DistributedGraphDb (pure interface)
    |                         |
Single Node             +-----+------+
                        |            |
                      Master       Worker
```

DistributedGraphDb is used as an intermediate interface for all the
things that should work only in distributed. Therefore, virtual calls
for distributed stuff have been removed from GraphDb. Some are exposed
via DistributedGraphDb, other's are only in concrete Master and Worker
classes. The code which relied on those virtual calls has been
refactored to either use DistributedGraphDb, take a pointer to what is
actually needed or use dynamic_cast. Obviously, dynamic_cast is a
temporary solution and should be replaced with another mechanism (e.g.
virtual call, or some other function pointer style).

The cost of the above change is some code duplication in constructors
and destructors of classes. This duplication has a lot of little tweaks
that make it hard to generalize, not to mention that virtual calls do
not work in constructor and destructor. If we really care about
generalizing this, we should think about abandoning RAII in favor of
constructor + Init method.

The next steps for splitting the dependencies that seem logical are:

  1) Split GraphDbAccessor implementation, either via inheritance or
     passing in an implementation pointer. GraphDbAccessor should then
     only be created by a virtual call on GraphDb.
  2) Split Interpreter implementation. Besides allowing single node
     interpreter to exist without depending on distributed, this will
     enable the planner and operators to be correctly separated.

Reviewers: msantl, mferencevic, ipaljak

Reviewed By: msantl

Subscribers: dgleich, pullbot

Differential Revision: https://phabricator.memgraph.io/D1493
2018-07-20 10:48:38 +02:00
..
bolt_chunked_decoder_buffer.cpp Remove obsolete network buffers 2018-04-06 16:26:46 +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 Extract communication to static library 2018-07-11 12:52:41 +02:00
bolt_encoder.cpp Extract communication to static library 2018-07-11 12:52:41 +02:00
bolt_session.cpp Support streaming of Bolt results 2018-07-18 13:01:50 +02:00
bolt_testdata.hpp Removed large bolt encoder test to reduce runtime. 2017-05-03 14:50:02 +02:00
CMakeLists.txt Support streaming of Bolt results 2018-07-18 13:01:50 +02:00
communication_buffer.cpp Remove obsolete network buffers 2018-04-06 16:26:46 +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 Use the same ClientPools in distributed 2018-03-01 17:14:59 +01:00
cypher_main_visitor.cpp Remove keyword lowercasing from stripper 2018-07-19 17:08:45 +02:00
database_key_index.cpp Add support for the id function 2018-07-04 22:14:13 +02:00
database_label_property_index.cpp Add support for the id function 2018-07-04 22:14:13 +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 TypedValue/DecodedValue conversion to higher component 2018-07-11 12:51:31 +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 Write committed/aborted op to wal 2018-07-05 12:43:18 +02:00
distributed_common.hpp Split GraphDb to distributed and single node files 2018-07-20 10:48:38 +02:00
distributed_coordination.cpp Notify master of worker recovery 2018-05-10 11:09:34 +02:00
distributed_data_exchange.cpp Write committed/aborted op to wal 2018-07-05 12:43:18 +02:00
distributed_durability.cpp Write committed/aborted op to wal 2018-07-05 12:43:18 +02:00
distributed_dynamic_graph_partitioner.cpp Write committed/aborted op to wal 2018-07-05 12:43:18 +02:00
distributed_gc.cpp Write committed/aborted op to wal 2018-07-05 12:43:18 +02:00
distributed_graph_db.cpp Split GraphDb to distributed and single node files 2018-07-20 10:48:38 +02:00
distributed_interpretation.cpp Split GraphDb to distributed and single node files 2018-07-20 10:48:38 +02:00
distributed_query_plan.cpp Implement Reset for distributed operators 2018-07-06 16:02:17 +02:00
distributed_reset.cpp Implement Reset for distributed operators 2018-07-06 16:02:17 +02:00
distributed_serialization.cpp Add support for the id function 2018-07-04 22:14:13 +02:00
distributed_token_sharing.cpp Create Dynamic Graph Partitioner, 2018-05-29 11:32:39 +02:00
distributed_updates.cpp Split GraphDb to distributed and single node files 2018-07-20 10:48:38 +02:00
distributed_vertex_migrator.cpp Fix compilation 2018-07-06 12:49:21 +02:00
durability.cpp Extract TypedValue/DecodedValue conversion to higher component 2018-07-11 12:51:31 +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 Migrate db::types to storage:: 2018-01-17 10:35:12 +01:00
graph_db_accessor.cpp Migrate db::types to storage:: 2018-01-17 10:35:12 +01:00
graph_db.cpp Migrate db::types to storage:: 2018-01-17 10:35:12 +01:00
interpreter.cpp Support streaming of Bolt results 2018-07-18 13:01:50 +02:00
kvstore.cpp Use temporary durability directory in PVS unit test 2018-06-15 15:27:36 +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 Add support for the id function 2018-07-04 22:14:13 +02:00
mvcc_find.cpp GC bugfixes, MVCC and transaction refactoring 2017-06-12 10:46:12 +02:00
mvcc_gc_common.hpp Extract tx::SingleNodeEngine from tx::MasterEngine 2018-01-11 15:44:42 +01:00
mvcc_gc.cpp Add support for the id function 2018-07-04 22:14:13 +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 Add support for the id function 2018-07-04 22:14:13 +02:00
network_endpoint.cpp Rename NetworkEndpoint 2018-01-15 15:47:37 +01:00
network_timeouts.cpp Implement SSL support for servers and clients 2018-06-20 17:56:47 +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 Add test stream clause 2018-07-09 11:00:18 +02:00
query_cost_estimator.cpp Add timestamp function 2018-06-27 16:06:54 +02:00
query_expression_evaluator.cpp Add support for the id function 2018-07-04 22:14:13 +02:00
query_plan_accumulate_aggregate.cpp Rename AstTreeStorage to AstStorage 2018-06-14 13:39:03 +02:00
query_plan_bag_semantics.cpp Rename AstTreeStorage to AstStorage 2018-06-14 13:39:03 +02:00
query_plan_common.hpp Extract TypedValue/DecodedValue conversion to higher component 2018-07-11 12:51:31 +02:00
query_plan_create_set_remove_delete.cpp Rename AstTreeStorage to AstStorage 2018-06-14 13:39:03 +02:00
query_plan_edge_cases.cpp Support streaming of Bolt results 2018-07-18 13:01:50 +02:00
query_plan_match_filter_return.cpp Split GraphDb to distributed and single node files 2018-07-20 10:48:38 +02:00
query_planner.cpp Add full support for Optional in distributed planning 2018-07-13 13:02:30 +02:00
query_semantic.cpp Implement extract function 2018-06-28 17:45:20 +02:00
query_variable_start_planner.cpp Rename AstTreeStorage to AstStorage 2018-06-14 13:39:03 +02:00
queue.cpp Add first version of message passing and rpc 2017-12-05 14:51:18 +01:00
raft_storage.cpp Cleanup utils::File API 2018-01-16 15:38:12 +01:00
raft.cpp RPC refactor 2018-01-24 15:27:40 +01:00
record_edge_vertex_accessor.cpp Refactor state deltas call 2018-02-26 15:44:50 +01:00
ring_buffer.cpp Extract io/network into mg-io library 2018-05-30 14:58:41 +02:00
rpc_worker_clients.cpp Remove 'using namespace' from header files 2018-06-15 15:28:31 +02:00
rpc.cpp Replace boost with capnp in RPC 2018-06-04 10:45:12 +02:00
serialization.cpp Replace boost with capnp in RPC 2018-06-04 10:45: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 support for the id function 2018-07-04 22:14:13 +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 Remove keyword lowercasing from stripper 2018-07-19 17:08:45 +02:00
transaction_engine_distributed.cpp Replace command_id_t with CommandId and transaction_id_t with TransactionId. 2018-04-20 13:55:14 +02:00
transaction_engine_single_node.cpp Replace command_id_t with CommandId and transaction_id_t with TransactionId. 2018-04-20 13:55:14 +02:00
typed_value.cpp Refactor GraphDb 2018-01-12 16:47:24 +01: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