Commit Graph

151 Commits

Author SHA1 Message Date
Mislav Bradac
cbe6648eb8 Migrate command line args to gflgs in tests
Summary: Some other minor cleanups

Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D523
2017-07-06 13:54:12 +02:00
matej.gradicek
818ac3b731 Added rapidcheck
Reviewers: buda, teon.banek

Reviewed By: buda, teon.banek

Subscribers: lion, pullbot

Differential Revision: https://phabricator.memgraph.io/D509
2017-06-30 16:26:21 +02:00
Teon Banek
20769404d8 Cleanup includes in CMakeLists
Summary:
Don't include `${CMAKE_BINARY_DIR}/include` since it is not needed and
would only slow down compilation.

Also removed `include_directories` for `fmt`, since it is built using
`add_subdirectory`. (The `add_subdirectory` also does the include.)

Use `add_custom_target` for calling `recursive_include` instead of
`custom command`. This allows specifying that `recursive_include`
depends on `plan_template_cpp`.

Reviewers: mislav.bradac, buda

Reviewed By: mislav.bradac, buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D511
2017-06-27 11:55:13 +02:00
Dominik Gleich
e2f3aba332 Use GLogger instead of broken memgraph Logger.
Summary:
http://rpg.ifi.uzh.ch/docs/glog.html

Second phase before tests complete.

Delete logging test.

Finish relase loging.

Reviewers: mislav.bradac, teon.banek, buda

Reviewed By: teon.banek

Subscribers: buda, pullbot

Differential Revision: https://phabricator.memgraph.io/D500
2017-06-21 15:33:24 +02:00
Teon Banek
bed62c4f8b Setup building with glog library
Summary:
To use the library in code, do the following.

  * Include glog, `include "glog/logging.h"`
  * Initialize logging from a main entry point,
    `google::InitGoogleLogging(argv[0]);`
  * Log anywhere from your code, `LOG(INFO) << "Hello world from glog";`

For advanced use, refer to glog's documentation.

Reviewers: mislav.bradac, florijan, dgleich, buda

Reviewed By: mislav.bradac, buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D492
2017-06-20 09:38:57 +02:00
Mislav Bradac
6403599a5d Generate plan_compiler_flags only if needed
Reviewers: teon.banek, buda

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D485
2017-06-16 15:58:32 +02:00
Marko Budiselic
9ed4102897 Release preparation.
Summary: Alpha config fix. Docker volume support.

Reviewers: teon.banek, dgleich

Reviewed By: teon.banek, dgleich

Subscribers: pullbot, buda

Differential Revision: https://phabricator.memgraph.io/D484
2017-06-16 15:16:11 +02:00
Teon Banek
d0016ab98c Add simple logging to a file
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D476
2017-06-16 10:19:37 +02:00
Mislav Bradac
67b859cf13 Add AST cache
Reviewers: buda, teon.banek, florijan

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D468
2017-06-14 18:59:31 +02:00
Mislav Bradac
c56eb4310e Remember token positions for literals
Summary: Remove yaml

Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D466
2017-06-13 17:11:27 +02:00
Mislav Bradac
f7d540829a Add deep clone to Ast
Summary: Prepare your aspergillums for blessing this magnificent diff.

Reviewers: buda, teon.banek, florijan

Reviewed By: teon.banek

Subscribers: lion, pullbot

Differential Revision: https://phabricator.memgraph.io/D458
2017-06-13 12:22:25 +02:00
florijan
afbb940a05 GC bugfixes, MVCC and transaction refactoring
Summary:
- GC changed to evaluate old records w.r.t. the oldest transaction's id AND snapshot, as opposed to only id
- MVCC hints exp+aborted race condition prevented
- minor MVCC refactors and cleanups
- minor Transaction refactors and cleanups

Reviewers: buda, dgleich

Reviewed By: buda, dgleich

Subscribers: dtomicevic, pullbot

Differential Revision: https://phabricator.memgraph.io/D434
2017-06-12 10:46:12 +02:00
Teon Banek
2a7a117720 Remove some unused stuff from CMakeLists
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D443
2017-06-08 16:30:21 +02:00
Teon Banek
04a5bdeb82 Remove unused config source code files
Reviewers: dgleich, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D442
2017-06-08 16:10:55 +02:00
Teon Banek
7091be1891 Don't pass MEMGRAPH_ALL_LIBS to all cmake targets
Summary:
CMake is smart enough to transitively detect dependencies and link them
appropriately. Therefore, it is enough that we put all libraries that
memgraph uses to the dependency list of memgraph_lib and memgraph_pic
targets.

Patch the fmt library for C++14 and higher

fmt library would detect that C++11 is supported and then put the
compiler flag. This flag was set so it overrides parent project compiler
flags. This override from fmt would prevent us from using C++14
features. New version (3.1) of fmt resolves this issue, but it hasn't
been released yet. Therefore, this commit updates the script which
clones fmt to use the released 3.0.1 version and apply the fix on that.

Reviewers: dgleich, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D441
2017-06-08 14:14:01 +02:00
Mislav Bradac
fea9031605 Refactor stripper
Summary: Fix tests

Reviewers: buda, florijan, teon.banek

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D435
2017-06-07 18:47:09 +02:00
Dominik Gleich
65507da9eb Load configs from flagfiles.
Summary: Migrate configto gflags.

Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D433
2017-06-07 15:38:17 +02:00
Dominik Gleich
ebdee4e509 Skiplist garbage collector rework.
Summary:
Drawing:
https://drive.google.com/open?id=0B-W7PQZqMD9hcG04b0lKaGZGOWM

Reviewers: mislav.bradac, buda, florijan

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D395
2017-06-07 10:47:02 +02:00
matej.gradicek
15b57e2d52 Implemented recovery and tests.
Summary: Implemented durability recovery and tesats.

Reviewers: mislav.bradac, dgleich, buda

Reviewed By: mislav.bradac, dgleich, buda

Subscribers: dtomicevic, mferencevic, pullbot

Differential Revision: https://phabricator.memgraph.io/D374
2017-06-06 15:12:34 +00:00
Teon Banek
666f8e1a93 Add tuning debug builds for debugger
Summary:
A new variable has been added to CMakeLists -- `PREFERRED_DEBUGGER`.
Here, you can specify which debugger you are using, so that the compiler
produces tuned debug builds for that debugger. Currently only 'gdb' and
'lldb' are supported, since we  use 'gcc' and 'clang' compilers.
Unsupported combination of `PREFERRED_DEBUGGER` and used compiler is
displayed as a warning, and the build uses default debug flags.

Reviewers: florijan, mislav.bradac, dgleich, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D426
2017-06-06 09:31:35 +02:00
florijan
509d5db67a Query - plan - cost estimator basic. REPL mods
Reviewers: teon.banek, buda, mislav.bradac

Reviewed By: teon.banek, buda

Subscribers: pullbot, teon.banek

Differential Revision: https://phabricator.memgraph.io/D399
2017-06-02 12:44:17 +02:00
Teon Banek
f0422c0e11 Generate multiple plans depending on starting node
Summary:
Permute query parts.

Permute matching only by selecting the starting node.

Flip the expansion when expanding from the other node.

Split planner into rule_based_planner and variable_start_planner

Use symbol hash when collecting expansion nodes

Multiple node atoms may point to the same symbol, and we could generate
multiple starting positions per atom which are the same. Using symbol
hash and equality prevents generating those redundant plans.

Correctly permute optional and merge matchings

Test VariableStartPlanner

Reviewers: florijan, mislav.bradac, buda, lion

Reviewed By: florijan, buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D417
2017-06-01 16:38:21 +02:00
Dominik Gleich
a2d3577f0f Add google flags in preparation for deleting old logger.
Summary: Implement gflags and add optional port.

Reviewers: buda, teon.banek

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D391
2017-05-25 09:45:48 +02:00
matej.gradicek
e791e9b660 Summary:Added files for snapshot durability
Summary:
File buffer added

Implemented little more of snapshoter.

Resolved conflicts

More stuff implemented of snapshot durability.

More things in snapshoter.

Refactored, added comments

Merge branch 'dev' into durability_snapshot

Merge branch 'dev' into durability_snapshot

Resolved bug in scheduler, snapshoter is running in grpah_db.

Reviewers: mferencevic, buda, dgleich, mislav.bradac

Reviewed By: mferencevic, buda, dgleich, mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D232
2017-05-17 08:42:00 +00:00
Mislav Bradac
78af8c8339 Add variable with all memgraph dependent libraries
Reviewers: teon.banek, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D324
2017-04-27 18:40:34 +02:00
Mislav Bradac
5434e79ea6 Merge string utils to one file
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D281
2017-04-18 17:39:58 +02:00
Matej Ferencevic
f05fcd91c3 Refactored bolt session to use new decoder.
Summary:
Bolt buffer is now a template.

Communication worker now has a new interface.

Fixed network tests to use new interface.

Fixed bolt tests to use new interface.

Added more functions to bolt decoder.

Reviewers: dgleich, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D256
2017-04-15 16:35:09 +02:00
Teon Banek
3b27b20992 Reorganize query directory tree
Summary:
Move query/frontend/interpret to query/interpret.
Split interpret.hpp to frame.hpp and eval.hpp.
Move query/frontend/logical to query/plan.
Nest namespace frontend::opencypher inside query.

Reviewers: florijan, mislav.bradac, buda

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D272
2017-04-13 11:28:11 +02:00
Mislav Bradac
36129cdcae Implement simple function conversion
Reviewers: buda

Reviewed By: buda

Subscribers: florijan, teon.banek

Differential Revision: https://phabricator.memgraph.io/D264
2017-04-11 19:14:08 +02:00
Teon Banek
804d0b09b9 Move typed_value to query top level and namespace it
Summary:
Upgraded old uses of TypedValue.
Also, implemented operator<< for EdgeAccessor and VertexAccessor.

Reviewers: buda, florijan, mislav.bradac, mferencevic

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D251
2017-04-11 08:50:46 +02:00
florijan
d3692d439c Query::Plan::Operator - split into hpp and cpp
Reviewers: teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D204
2017-03-30 13:48:16 +02:00
Teon Banek
35668d5b9f Make GNU Readline dependency optional
Reviewers: florijan, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D171
2017-03-24 12:42:45 +01:00
Teon Banek
c2c34336c3 Split symbol_generator.hpp to .cpp
Reviewers: florijan, mislav.bradac

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D172
2017-03-24 12:07:42 +01:00
Marko Budiselic
66d56820ac Cleanup of poc/. Only CMakeLists is left because it is reasonable to have a proof of concept folder.
Summary: Cleanup of poc/.

Reviewers: dgleich, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot, buda

Differential Revision: https://phabricator.memgraph.io/D166
2017-03-23 18:10:37 +01:00
florijan
f304dfef28 Query Console implemented
Summary: buda, teon.banek, mislav.bradac

Reviewers: mislav.bradac, buda, teon.banek

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D163
2017-03-23 15:51:25 +01:00
Marko Budiselic
3b42cd2579 Everything is merged (communication + query engine) but we have to fix the PULL_ALL issue. 2017-03-22 17:57:06 +01:00
florijan
b236694fd2 Query - entry.hpp renamed to interpreter.hpp, Engine renamed to Interpreter
Summary: Query - interpreter console hack

Reviewers: buda, teon.banek, mislav.bradac

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D157
2017-03-22 16:39:00 +01:00
Matej Ferencevic
3bf0bd40a7 Initial version of new bolt encoder.
Reviewers: dgleich, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D104
2017-03-22 16:13:47 +01:00
Teon Banek
bed9324da9 Use SYSTEM when including various library directories
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D144
2017-03-17 17:33:05 +01:00
Teon Banek
baa644e9b7 Support creating NodeFilter and CreateOp logical operators
Reviewers: mislav.bradac, buda, florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D133
2017-03-16 10:06:01 +01:00
Teon Banek
c638955758 Remove ast.cpp from CMakeLists.txt 2017-03-13 16:06:37 +01:00
Marko Budiselic
3e0b12f646 Merge branch 'compiler_prototype' into dev 2017-03-13 13:35:23 +01:00
Mislav Bradac
026e0e6fbd Implement ast generation by cypher visitor 2017-03-11 23:22:38 +01:00
Teon Banek
fbf70de089 Add type checker which fills symbols for Ident 2017-03-11 18:04:48 +01:00
Teon Banek
ef764e0367 Add ProduceCursor and Evaluate to expression 2017-03-11 14:39:13 +01:00
Teon Banek
333861e7e9 Generate flags for PlanCompiler via cmake
Summary:
Add join function to functions.cmake

This is a convenience function which will join a list of values by
replacing ';' with the given separator.

cmake: Add fetching compile flags in gcc format

This is a utility function which takes all target compilation flags that
can be passed to gcc or clang.

Generate flags for PlanCompiler via cmake

Cmake will now collect all compiler options and definitions which are
then stored in a generated `query/plan_compiler.hpp`. The generated file
is not tracked by git and is stored inside cmake's build directory. The
file is fast to generate and may change often depending on the build
type.

Additionally, link and include directories are also generated as
absolute paths. In the future, we may want to support relative paths so
that copying/installing the build dir creates runnable binaries.

Add -Wall flag for all build types

Lowercase #pragma once in tests for network_common

It seems 'once' may be case sensitive, since clang outputs a warning for
it that the pragma is unknown.

Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D107
2017-03-10 18:21:31 +01:00
Teon Banek
9dada557a3 Add coverage option to cmake
Summary:
Coverage is by default set to OFF, but the new option can be used for convenient
toggle when building.

Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D109
2017-03-10 18:05:15 +01:00
Dominik Gleich
09dbe2e722 Include stderr so logger output can be surpressed during tests.
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D102
2017-03-09 10:09:58 +01:00
florijan
971e006d13 Query stripping now uses a parse tree and differentiates between int literals in a range expression (not stripped) and outside of a range (stripped).
Summary: See above

Reviewers: buda, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D98
2017-03-08 14:19:55 +01:00
Teon Banek
47ed127086 Generate openCypher parser sources if missing
Summary:
Makes cmake aware that parser source files are generated, so that it can
know how to set the dependencies for the underlying build tool. When the
files do not exist, invoking e.g. `make` will also run antlr to generate
them. Files will be regenerated only if their dependency changed
(Cypher.g4 file in this case).

Reviewers: buda, florijan

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D94
2017-03-08 09:31:21 +01:00