Commit Graph

1300 Commits

Author SHA1 Message Date
Teon Banek
0c186fe76f Add convenience functions and a macro to libs/CMakeLists.txt
Summary:
Add json and cppitertools to libs/CMakeLists.txt.
Import external projects as libraries.
This removes the need to use `add_dependencies` in order to link with
external project.
Extract common ExternalProject_Add function.
Add macro for easier addition of external libraries.

Reviewers: mislav.bradac, mferencevic

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D845
2017-10-03 14:28:16 +02:00
Matej Ferencevic
a40248ab65 Removed filename strings from release binary.
Reviewers: teon.banek, buda

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D839
2017-10-03 11:06:42 +02:00
florijan
5d2ee8f031 AST - pattern atom properties changed from map to unordered_map
Reviewers: mislav.bradac, buda, teon.banek

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D844
2017-10-02 14:24:56 +02:00
Matej Ferencevic
30573d4fd5 Removed chdir from main binary.
Reviewers: teon.banek, buda, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D842
2017-10-02 14:00:08 +02:00
Matej Ferencevic
b76a5f8c79 Changed 'maybe_unused' to 'gnu::unused'.
Reviewers: teon.banek, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D843
2017-10-02 13:59:35 +02:00
Mislav Bradac
7dedb88449 Minor cleanup
Reviewers: florijan

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D840
2017-09-27 17:25:00 +02:00
florijan
03c78c1277 BFS syntax changes
Summary:
- The new BFS syntax implemented as proposed.
- AST BreadthFirstAtom now uses EdgeAtom members: has_range_{true}, upper_bound_, lower_bound_
- Edges data structure now handles all the edge filtering (single or multiple edges), to ease planning. Additional edge filtering (additional Filter op in the plan) is removed. AST EdgeTypeTest is no longer used and is removed.

Current state is stable but there are things left to do:
- BFS property filtering.
- BFS lower_bound_ support.
- Support for lambdas in variable length expansion. This includes obligatory (even if not user_defined) inner_node and inner_edge symbols for easier handling.
- Code-sharing between BFS and variable length expansions.

I'll add asana tasks (and probably start working on them immediately) when/if this lands.

Reviewers: buda, teon.banek, mislav.bradac

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D836
2017-09-27 16:25:19 +02:00
Mislav Bradac
3140f175fc Implement record lock deadlock breaker
Reviewers: florijan, buda

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D823
2017-09-27 16:11:05 +02:00
Mislav Bradac
afff458afa Small cleanup of some mvcc classes
Reviewers: florijan, buda

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D835
2017-09-27 15:16:30 +02:00
Teon Banek
e70f4de208 Make almost all libs external
Summary:
Make 'benchmark' external project
Make 'fmt' external project
Make 'gtest' external project
Make 'gflags' external project
Skip fmt tests

Reviewers: mferencevic, mislav.bradac, buda

Reviewed By: mferencevic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D837
2017-09-27 13:46:33 +02:00
Mislav Bradac
56017e598e Abort all transactions on SIGTERM
Reviewers: buda, teon.banek, florijan

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D818
2017-09-27 10:56:44 +02:00
Mislav Bradac
4e4ed063fc Fix memory leak in InsertEdge
Summary:
Few days ago I put a task to reduce number of exceptions in memgraph codebase :)
I think we should use exceptions only in modules where we are using  smart pointers.

Reviewers: florijan, buda

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D834
2017-09-27 10:55:11 +02:00
Teon Banek
8c9ff2d79a Add version.hpp.in and display it on '--version' flag
Reviewers: mferencevic, buda, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D831
2017-09-27 09:04:44 +02:00
Teon Banek
eb821aa615 Remove ast-cache flag
Summary:
AST caching should be well tested by now.
We should consider removing `Context.is_query_cached_` member as well as the
implementation and tests for `CypherMainVisitor`.

Reviewers: mislav.bradac, mferencevic, buda

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D833
2017-09-27 09:04:31 +02:00
Teon Banek
b85ce7dfce Remove some unused variables and lambda captures
Reviewers: mferencevic, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D832
2017-09-27 09:04:15 +02:00
Teon Banek
9d4ae833cc Setup basic installation for CPackDeb
Summary:
Remove traces of plan_compiler in cmake.
Add memgraph executable to install target.
Fix indentation in tests/CMakeLists.txt.
Install alpha.conf to /etc/memgraph/config.
Rename executable to 'memgraph' and install /var dirs.

Reviewers: mferencevic, buda

Reviewed By: mferencevic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D829
2017-09-26 14:54:13 +02:00
florijan
a9381df09e Edges data structure now supports multiple edge filtering (implicit OR)
Summary: - modified all utils/algorithm functions to be inline and in the utils namespace

Reviewers: teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D830
2017-09-26 13:46:18 +02:00
Mislav Bradac
f91aa7b8fe Add medium sized pokec scenario
Summary: Add window size to plot throughput

Reviewers: florijan

Reviewed By: florijan

Differential Revision: https://phabricator.memgraph.io/D828
2017-09-25 13:20:08 +02:00
Teon Banek
a390d0994c Make antlr4 ExternalProject
Summary:
There's no need to rebuild antlr every time we recompile memgraph. This
should speed up the `make clean all` cycle.

Reviewers: mislav.bradac, mferencevic, buda

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D817
2017-09-25 09:46:23 +02:00
Matej Ferencevic
f060ad3f43 Added operation count to LDBC update runs.
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D827
2017-09-24 23:02:12 +02:00
Matej Ferencevic
99494d77e3 Integrated C++ CSV to snapshot into LDBC.
Reviewers: mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D826
2017-09-23 23:12:23 +02:00
florijan
d9503d6b65 Flags cleanup and QueryEngine removal
Summary:
I started with cleaning flags up (removing unused ones, documenting undocumented ones). There were some flags to remove in `QueryEngine`. Seeing how we never use hardcoded queries (AFAIK last Mislav's testing also indicated they aren't faster then interpretation), when removing those unused flags the `QueryEngine` becomes obsolete. That means that a bunch of other stuff becomes obsolete, along with the hardcoded queries. So I removed it all (this has been discussed and approved on the daily).

Some flags that were previously undocumented in `docs/user_technical/installation` are now documented. The following flags are NOT documented and in my opinion should not be displayed when starting `./memgraph --help` (@mferencevic):
```
query_vertex_count_to_expand_existsing (from rule_based_planner.cpp)
query_max_plans (rule_based_planner.cpp)
```

If you think that another organization is needed w.r.t. flag visibility, comment.

@teon.banek: I had to remove some stuff from CMakeLists to make it buildable. Please review what I removed and clean up if necessary if/when this lands. If the needed changes are minor, you can also comment.

Reviewers: buda, mislav.bradac, teon.banek, mferencevic

Reviewed By: buda, mislav.bradac

Subscribers: pullbot, mferencevic, teon.banek

Differential Revision: https://phabricator.memgraph.io/D825
2017-09-22 17:03:45 +02:00
florijan
b2f3dc1916 Available memory logging, utils/sysinfo/memory cleanup, tests/concurrent cleanup.
Summary:
Added a warning to the log. Every 3 seconds (let's not make that configurable). Can be turned off.

I still don't like this. We are raising another thread and reading a file to do monitoring. We're developing a DB, not a sys monitor. Serious admins do that themselves. But, here it is.

UPDATE:
Cleaned up `utils/sysinfo/memory`. Removed all unused functions. Removed the faulty memory check in `tests/concurrent`.

Reviewers: buda, mferencevic, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D819
2017-09-22 16:06:30 +02:00
Mislav Bradac
4e4fdd8029 Unwrap exception from optional before throwing
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D815
2017-09-22 15:46:19 +02:00
florijan
ff37c04b38 Snapshot flags name consistency
Reviewers: buda, mferencevic

Reviewed By: mferencevic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D821
2017-09-22 14:08:51 +02:00
Matej Ferencevic
e224199b36 Fixed LDBC test index creation for Neo4j.
Reviewers: teon.banek

Reviewed By: teon.banek

Differential Revision: https://phabricator.memgraph.io/D824
2017-09-22 14:06:35 +02:00
Teon Banek
acb102de65 Replace Python csv_to_snapshot with C++
Summary:
Setup scaffolding for building Memgraph tools.

Change `utils::Split` without delimiter to split on whitespace.
This should make `Split` behave just like Python's `str.split`, which is
more practical for splitting on word boundaries.

Add `utils::StartsWith` function.

Rewrite csv_to_snapshot to C++.

Reviewers: mferencevic

Reviewed By: mferencevic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D822
2017-09-22 13:59:42 +02:00
Matej Ferencevic
686dc452ee LDBC: Integrate with Apollo
Summary:
Run neo4j and memgraph from run_benchmark script.
This makes mg and neo scripts obsolete.

Reviewers: buda, teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D806
2017-09-21 22:29:42 +02:00
florijan
f2a82f4f58 Decoded value - returning non-const primitives by ref
Reviewers: mferencevic, mislav.bradac

Reviewed By: mferencevic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D820
2017-09-21 16:15:20 +02:00
Matej Ferencevic
383175d85f Bolt - path enconding and decoding
Summary:
Added path encoding and decoding in our Bolt layer. Returning paths to the Neo client seems to work fine.
Not sure how to test that the decoded works fine (our client?).
Tests are not written, that suite is complicated. Leaving that to mferencevic.
Also reduced DecodedValue a bit with macros. Less code, less error prone.

Reviewers: buda, florijan

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D810
2017-09-21 13:55:41 +02:00
Teon Banek
41a027a721 Remove unused variables and function
Reviewers: florijan, mislav.bradac, mferencevic, buda

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D816
2017-09-20 17:04:57 +02:00
Teon Banek
4a602a445a Split MATCH ... WHERE filtering on AND
Summary:
Test planner splits MATCH ... WHERE
Remove distinction between FilterAnd and AndOperator

Reviewers: florijan, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D814
2017-09-20 17:04:30 +02:00
Mislav Bradac
0eceefb2d4 Newer bits on head chunk in DynamicBitset
Reviewers: florijan, buda

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D813
2017-09-20 16:56:58 +02:00
Teon Banek
182a9241cf Use symbol names for header if missing token position
Summary:
This fixes a bug, where streaming would try to get the name of the symbol from
an invalid token position. For example, `MATCH (n) WITH n RETURN *`

Reviewers: florijan, mislav.bradac

Reviewed By: florijan, mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D811
2017-09-20 15:38:53 +02:00
Teon Banek
08eaaba77f Add caching logical plans
Summary: Add const to MakeCursor method

Reviewers: florijan, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D791
2017-09-20 13:31:26 +02:00
Mislav Bradac
cf7190ecc6 Refactor long running benchmark
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D801
2017-09-20 10:36:51 +02:00
florijan
d6a885cce6 Traversal API removed
Summary: Removed the traversal API, been waiting for named path to land because that data structure has replaced traversal's Path. I left the wiki page of the API, just put a warning that it's not used.

Reviewers: buda, teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D809
2017-09-20 10:30:45 +02:00
florijan
9edc472eaf Resolving TODOs in the operator implementations
Summary:
Three TODOs resolved.

1. around line 897 - we currently don't support expansion into existing variable length edges (there is a TODO in symbol_generator.cpp:213), so this should not be done at the moment.

2. around line 1025 - This TODO was on review and nobody commented, so I'm removing it. Should have done that when the diff landed.

3. around line 1560 - This does not seem possible. Edge-uniqueness checks happen within a single `[OPTIONAL ] MATCH`. If it is OPTIONAL (the case interesting here), then the uniqueness check also gets planned under the optional branch. So, if an optional fails, the uniqueness check will get skipped, as opposed to getting executed over a Null. I added an edge-case test to verify this (and checked with the planner test).

Reviewers: buda, teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D807
2017-09-19 09:48:28 +02:00
florijan
347611edfd Named path support
Reviewers: buda, teon.banek, mislav.bradac

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D794
2017-09-19 09:45:50 +02:00
Teon Banek
a2c56dd83e Build dataset and convert to neo4j and memgraph formats
Reviewers: mferencevic, buda

Reviewed By: mferencevic

Differential Revision: https://phabricator.memgraph.io/D808
2017-09-18 17:17:44 +02:00
Matej Ferencevic
9a080ba024 Initialize Dbms before starting the network server
Reviewers: teon.banek, buda

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D805
2017-09-18 15:29:20 +02:00
Teon Banek
212f6cfa98 manual.query_planner: Print Produce symbols
Reviewers: florijan, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D792
2017-09-18 15:07:10 +02:00
Matej Ferencevic
2603209849 Replaced Python long running test with C++ version
Reviewers: buda, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D802
2017-09-18 15:06:22 +02:00
Matej Ferencevic
0dfbc001a7 Moved json.hpp to deps server
Reviewers: buda, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D803
2017-09-18 15:06:07 +02:00
Matej Ferencevic
cd1892acc4 Rewritten long running test in C++.
Reviewers: florijan, mislav.bradac

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D784
2017-09-18 09:49:32 +02:00
Sasa Stanko
9b7d6a142b Implement create vertex and count vertices query
Reviewers: buda, lion

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D723
2017-09-18 07:26:03 +02:00
florijan
48e446688f IndexInfo function added
Summary:
- Keys() functions in the indices can't be const because ConcurrentMap doesn't provide const accessors (and they are broken in skiplist) :D
- no cucumber tests because many tests create indices so it's hard to say what's inside and what not

Reviewers: buda, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D797
2017-09-16 14:09:35 +02:00
Matej Ferencevic
a14f8c6516 Removed buggy check from QA
Reviewers: buda, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D796
2017-09-15 16:24:51 +02:00
Teon Banek
b31478dfd8 Look into parameter value when estimating plan cost
Summary: Test cost estimator considers parameter values

Reviewers: florijan, mislav.bradac

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D798
2017-09-15 16:14:57 +02:00
Mislav Bradac
960c5e6092 Change parent macrobenchmark generate
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D800
2017-09-15 14:51:39 +02:00