Commit Graph

1262 Commits

Author SHA1 Message Date
florijan
1d112e1141 GraphDbAccessor - style change
Summary: Not strictly neccessary, but it's been itching me. It took an hour.

Reviewers: buda, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D648
2017-08-09 16:09:08 +02:00
florijan
47c1cd6e3d Degree(Vertex) function added
Summary:
- added only one function for getting the total (in + out) vertex degree, it's required for the Ravelin use-case
- specific `degree_in` and `degree_out` functions can be added as necessary
- also fixed random_graph_generator bug (needed it for testing)

Reviewers: buda, mislav.bradac

Reviewed By: buda, mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D652
2017-08-09 15:06:10 +02:00
Matej Ferencevic
6a2d123f30 Temporary IDs now sent to Bolt client. Documentation updated.
Reviewers: buda, florijan

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D643
2017-08-09 14:45:09 +02:00
Goran Zuzic
5c4c4919a2 Better OnEvent usability
Reviewers: lion, buda, sasa.stanko

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D650
2017-08-09 11:59:17 +02:00
florijan
caff5e4066 map_operations.feature added to QA
Reviewers: buda, mferencevic

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D651
2017-08-09 11:53:35 +02:00
Sasa Stanko
d88380c602 Replace SendHelper with Send call
Reviewers: zuza

Reviewed By: zuza

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D649
2017-08-08 18:47:06 +02:00
Goran Zuzic
045e14e139 Callback interface consistency changes
Summary:
1. add a test for unsubscription service
2. change the callback to accept const subscription&
3. renamed Send -> SendHelper
4. created a more usable Send
5. changed the Send usages

Reviewers: buda, lion, sasa.stanko

Reviewed By: sasa.stanko

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D647
2017-08-08 17:22:26 +02:00
Sasa Stanko
54b7851f84 Add typed version of pop/await event functions
Reviewers: zuza

Reviewed By: zuza

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D646
2017-08-08 16:47:44 +02:00
Goran Zuzic
6ce504349f Adding callback by type (Work in Progress)
Summary:
Merge branch 'dev' of https://phabricator.memgraph.io/diffusion/MG/memgraph into dev

Finished adding callback by type.

Reviewers: buda, lion, sasa.stanko

Reviewed By: sasa.stanko

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D644
2017-08-08 15:56:49 +02:00
Goran Zuzic
16170d22da Set .ycm_extra_config to work with other editors
Reviewers: mislav.bradac

Reviewed By: mislav.bradac

Differential Revision: https://phabricator.memgraph.io/D645
2017-08-08 15:51:56 +02:00
florijan
b8957c999d Map type now supported
Summary:
- MapLiteral added
- PropertyLookup on maps added

This is the basic implementation, missing are:
- unit tests
- feature and TCK tests
- documentation
- changelog

That stuff is coming. Please review the implementation (Mislav).

Reviewers: mislav.bradac, buda, teon.banek

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D640
2017-08-08 14:34:26 +02:00
Sasa Stanko
bfe9ec0ab5 Fix bug in StopServer function
Summary: Add test for system start and shutdown

Reviewers: mferencevic, zuza

Reviewed By: mferencevic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D642
2017-08-08 13:19:22 +02:00
Sasa Stanko
82f1cb333d Test for exception throws when channel name exist
Reviewers: zuza

Reviewed By: zuza

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D641
2017-08-07 18:00:50 +02:00
Mislav Bradac
7fe799f232 Fix tests that expect debug_assert to fail
Reviewers: buda, mferencevic

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D639
2017-08-07 16:38:15 +02:00
Matej Ferencevic
2ba0f0cdea Initial version of distributed networking stack.
Reviewers: buda, lion

Reviewed By: buda

Subscribers: pullbot, zuza

Differential Revision: https://phabricator.memgraph.io/D636
2017-08-07 16:26:43 +02:00
Goran Zuzic
59b395626c Implemented EventStream::Close
Summary:
1. Consistency Changes in Reactors
2. Renamed Channel -> Connector where appropriate

Merge branch 'dev' of https://phabricator.memgraph.io/diffusion/MG/memgraph into dev

Reviewers: lion, buda

Reviewed By: buda

Subscribers: pullbot, sasa.stanko

Differential Revision: https://phabricator.memgraph.io/D638
2017-08-07 14:12:55 +02:00
Teon Banek
0b8d71ee8f Plan BreadthFirstExpand
Summary:
Test planning BreadthFirstExpand

Add bfs tests to memgraph qa

Allow pointers in `print-operator-tree` for gdb

Reviewers: florijan, mislav.bradac

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D618
2017-08-07 10:44:10 +02:00
Goran Zuzic
b68265823c Removed Double Locking, Simplified Ownership or LocalEventStream, ....
Summary:
1. added TAGS to .gitignore
2. Commented: LockedGetPendingMessages is not fair.
3. Removed lock from EventQueue dtor.
4. Changed recursive_mutex -> mutex in Reactor and EventQueue.
5. [main change] made LocalEventStream a composite part of EventQueue, the new and only way to close EQ is to call close() in Reactor
6. [main change] make LocalChannel non-unique, it can be freely created and shared around.
7. renamed Reactor::Close into Reactor::CloseConnector

Reviewers: lion, buda

Reviewed By: lion

Subscribers: mislav.bradac, pullbot

Differential Revision: https://phabricator.memgraph.io/D630
2017-08-04 17:58:22 +02:00
Mislav Bradac
599e5651af Make debug_assert noop on NDEBUG
Reviewers: mferencevic

Reviewed By: mferencevic

Subscribers: mferencevic, pullbot

Differential Revision: https://phabricator.memgraph.io/D634
2017-08-04 15:05:26 +02:00
Mislav Bradac
cc8e9f2996 Fix of stupid, stupid bug
Reviewers: mferencevic, buda

Reviewed By: mferencevic

Subscribers: florijan, pullbot

Differential Revision: https://phabricator.memgraph.io/D635
2017-08-04 15:03:59 +02:00
florijan
bce4407ebe CostEstimator - adding new ScanAll and Expand ops
Summary:
Now all ScanAll and Expand ops are covered by the cost estimator. For ScanAll with indices cost estimation is pretty good, for new Expand ops it is tragically bad (Expand to the power of expansion depth, plus arbitrary filtering). Static cost estimation is wrong wrong wrong.

Currently cost estimation of even trivial plans that use indices is wrong because the planner leaves filtering expressions that are implicitly handled by the index in the operator tree, IIRC. Tasking Teon to revise this, even though I'm not sure how bad an influence this has on cost estimation and it's use in plan choosing.

Reviewers: mislav.bradac, teon.banek, buda

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D633
2017-08-04 14:32:22 +02:00
florijan
6c22caa80e Query::Plan::Expand with preceeding optional bug fix
Summary:
This diff contains a bug fix for the expansion operators that are currently on dev.
More importantly, it proposes end-to-end testing for edge-cases for which it's a
pain to write single-phase tests. In my opinion this is OK, you're all reviewers so
you can comment.

The test relies on left-to-right query execution. We need this guarantee in tests
like this. I propose renaming "RuleBasedPlanner" to "LeftToRightPlanner" to make
this explicit. As Teon is not here at the moment, will make this a task/discussion.

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

Reviewed By: mislav.bradac

Subscribers: mferencevic, pullbot

Differential Revision: https://phabricator.memgraph.io/D626
2017-08-04 12:16:26 +02:00
florijan
0f73c2451b Query::Plan::ExpandVariable - graph state bugfix
Reviewers: buda, teon.banek, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D631
2017-08-04 12:12:44 +02:00
Matej Ferencevic
7939b04117 Removed unused template parameter from network stack.
Reviewers: mislav.bradac, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D632
2017-08-04 11:12:08 +02:00
Mislav Bradac
d750970381 Lock when accessing parser to prevent antlr bugs
Reviewers: buda, mferencevic

Reviewed By: buda, mferencevic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D625
2017-08-03 16:38:08 +02:00
Matej Ferencevic
71ded22b65 Removed Dbms and QueryEngine from the Network stack.
Reviewers: buda, mislav.bradac

Reviewed By: buda, mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D628
2017-08-03 16:33:10 +02:00
florijan
e45ae4c4b6 Query::Plan::ExpandBreadthFirst added
Summary:
Not complete (but review can start):
- implementation should be done
- still need to finish tests
- documentation missing

Reviewers: mislav.bradac, teon.banek, buda

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D616
2017-08-03 16:22:38 +02:00
Mislav Bradac
da0e4a5b12 Implement explicitly started transactions
Summary: Fix tests

Reviewers: buda, mferencevic

Reviewed By: mferencevic

Subscribers: mferencevic, pullbot

Differential Revision: https://phabricator.memgraph.io/D623
2017-08-03 16:17:19 +02:00
florijan
bb5d06e276 Skiplist::position_and_count fix
Summary: Fixed bug for SkipList::position_and_count for an item lesser then all skiplist elements.

Reviewers: mislav.bradac

Reviewed By: mislav.bradac

Differential Revision: https://phabricator.memgraph.io/D629
2017-08-03 14:57:11 +02:00
florijan
31ee8a148f Long running test speedup
Summary: Index added to long running test to speed up edge creation and vertex deletion.

Reviewers: buda, mferencevic

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D621
2017-08-03 14:48:55 +02:00
Matej Ferencevic
797fa10f7c Added antlr sigsegv test.
Reviewers: buda, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D622
2017-08-03 13:06:18 +02:00
Matej Ferencevic
a11c9885ad Merged experimental repo.
Summary:
Fixed distributed init.
Add CMakeLists to build experimentall/distribuedClosing unused Channels, work in progress.
Make System the owner of Reactor.
This entails changing shared_ptr -> unique_ptr and some pointers to references.
Merged experimental repository into memgraph.
Moved experimental repo to experimental directory.
Removed obsolete experimental files.
Added comments.
Merge branch 'master' of https://phabricator.memgraph.io/source/experimental
Subscription service unsubscribe.
Add Close method on EventStream.
Add placeholder for the configuration class.
Remove comments.
Merge branch 'master' of https://phabricator.memgraph.io/source/experimental
Clean-up parameters for EventQueue.
Merge branch 'master' of https://phabricator.memgraph.io/source/experimental
Add Channel::serialize method implementation.
Merge.
Add docs on event stream.
Clang-format merge conflicts.
First implementations of serialize methods.
Add hostname, port, and names as methods in Channel base class.
Add reactor name and name methods to LocalChannel.
Add reactor name to LocalChannel.
Add name to LocalChannel.
Add serialization service.
Serialize_test removed.
Merge branch 'master' of https://phabricator.memgraph.io/source/experimental
Move Message to the end of communications files.
Full example of serialization with cereal.
Fix constructor calls.
Merge branch 'master' of https://phabricator.memgraph.io/source/experimental
Avoid using `FindChannel` in the transaction code.
Merge branch 'master' of https://phabricator.memgraph.io/source/experimental
Init script creates libs folder.
Merge branch 'master' of https://phabricator.memgraph.io/source/experimental
Add System pointer to Network.
serialized_test binary is removed from the repo.
Merge branch 'master' of https://phabricator.memgraph.io/source/experimental
Cereal basic example.
Merge branch 'master' of https://phabricator.memgraph.io/source/experimental
Callbacks finished.
Always open the main channel by default.
Fixed callbacks, wrong number of emplace arguments.
Callbacks WIP.
Raise connector mutex to reactor level.
Add argument to LockedPush.
Fix data race in connector closing.
Merge branch 'master' of https://phabricator.memgraph.io/source/experimental
Add functional header.
Fixed to make the changes work.
Merge branch 'master' of https://phabricator.memgraph.io/source/experimental
Merge branch 'master' of https://phabricator.memgraph.io/source/experimental
Refactored connectors into Reactors
Use shared pointer for the mutex.
Rename to Open and Close in implementation file.
Rename Create to Open and Destroy to Close.
Merge branch 'master' of https://phabricator.memgraph.io/source/experimental
Adding callback to Reactors; work in progress
Add stubs for asynchronous channel resolution.
Add stubs for the networking service.
Replace reactor pointers with shared ptrs, disable System assignment.
Forbid assignment.
Replace raw channel pointers with shared pointers.
Replace raw event stream pointer with shared pointer.
Rename default stream name.
Use recursive mutex in System.
Main uses Spawn method. All files are formatted.
Move thread local to a cpp file.
Work in progress on Spawn method.
Merge branch 'master' of https://phabricator.memgraph.io/source/experimental
Kill out graph.hpp to make it compile
Add Spawn method prototype.
Fix return type.
Merge branch 'master' of https://phabricator.memgraph.io/source/experimental
Add method used to create nameless channels.
Add format script.
Introduce the Reactor base class.
Merge branch 'master' of https://phabricator.memgraph.io/source/experimental
Add compile script.
added comments about class terminology
Spinner rewrite (graph data structures and algo)
Organize Spinner code
Create working version
Improves Spinner implementation and testing
Spinner fix
.arcconfig
Merge branch 'master' of https://phabricator.memgraph.io/source/experimental
Add graph
Spinner work
Spinner added
Merge branch 'master' of https://phabricator.memgraph.io/source/experimental
Add communication
.clang-format + ycm config.
Init. Distributed hackaton.
Implementation of lock-free list from Petar Sirkovic.
pro compiler
Merge branch 'master' of https://phabricator.memgraph.io/source/experimental
Implement Match
Add test data.
Insert quotes before and after props and labels
Multiple node declarations, along with edges.
After merge.
Node property creations work now.
Bug fix in visitor
After merge.
Implement node creation with labels.
Implement boolean operators
Tidy up ImplementedVistor.
Implement expression6 (addition)
Implement basic type visitor functions
Cypher Visitor Implementation class created.
Fix style.
Fix template synrax in main.cpp
Merge remote-tracking branch 'origin/master'
Add pretty_print
Update main and BaseVisitor to present return value.
Headers included. Temporary fix.
Antlr4 module reintroduced.
Updateao git config.
Fix trailing space.
CMake 2.8 fix rerolled, 3.1 minimum version req.
Fix for Cmake version 2.8 compatibility.
Build works.
Tidy src folder. Include generated files for antlr.
Included antlr generated files.
Changed directory structure.
Cmake: include subdirectory.
GenerateRuntime, partial.
Add GenerateParser target to cmake.
Remove main.cpp
Merge remote-tracking branch 'origin/master'
Add requirements
Main file added. Run the lexer and parser with this.
Add antlr_generated to baby_compiler
Experimental memory_tracker and opencypher tck tests

Reviewers: mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D627
2017-08-03 12:48:19 +02:00
Mislav Bradac
6bc9deba5f Replace map with bitset in stripped query
Summary:
Implement trie and use it in stripper

Make it nicer

Reviewers: buda, florijan

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D614
2017-08-02 22:17:36 +02:00
florijan
57dea09b5b Console and random-graph generation improvements
Summary: Random graph generation is now parallel. Slow, though.

Reviewers: teon.banek, buda, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D586
2017-08-02 12:23:51 +02:00
Matej Ferencevic
2ba3df942b Added continuous_integration script to stress tests.
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D620
2017-08-02 12:06:59 +02:00
Matej Ferencevic
374fda2a9d Removed unnecessary dependencies from QA.
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D617
2017-08-02 12:06:42 +02:00
Mislav Bradac
5e3ff2438e Fix some benchmarks
Summary: Fix bug in perf wrapper

Reviewers: mferencevic

Reviewed By: mferencevic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D611
2017-07-30 20:12:25 +02:00
Matej Ferencevic
8d482f5fcd Fixed apollo cppcheck run.
Reviewers: mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D610
2017-07-30 12:38:41 +02:00
Teon Banek
4b72118894 Generate symbols for BFS
Reviewers: florijan, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D608
2017-07-30 12:25:30 +02:00
Mislav Bradac
0aa399bd91 Add cpu time to harness
Reviewers: mferencevic

Reviewed By: mferencevic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D607
2017-07-30 11:42:17 +02:00
Matej Ferencevic
4a3c029c19 Created debug and release build scripts.
Reviewers: teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D609
2017-07-30 11:20:13 +02:00
Teon Banek
c84d8f6bd7 Add BreadthFirstAtom to Ast
Summary: Add BFS to Cypher grammar

Reviewers: florijan, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D605
2017-07-29 23:53:31 +02:00
Matej Ferencevic
e8dd64f6d3 Macro benchmark now uses release binary.
Reviewers: mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D606
2017-07-29 23:48:36 +02:00
Mislav Bradac
515bc35911 Add dependency to memgraph_link_target
Reviewers: mferencevic

Reviewed By: mferencevic

Differential Revision: https://phabricator.memgraph.io/D604
2017-07-29 22:23:50 +02:00
Mislav Bradac
ddbb63a601 More apollo harness integration
Reviewers: mferencevic

Reviewed By: mferencevic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D603
2017-07-29 21:58:10 +02:00
Matej Ferencevic
0f562cd043 First version of apollo harness integration.
Reviewers: mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D602
2017-07-29 21:14:29 +02:00
Mislav Bradac
d9fbcfc1a2 Don't init perf if on apollo
Reviewers: mferencevic

Reviewed By: mferencevic

Differential Revision: https://phabricator.memgraph.io/D601
2017-07-29 19:21:50 +02:00
Mislav Bradac
b98c12ea89 Clean up of benchmark requirements file
Reviewers: mferencevic

Reviewed By: mferencevic

Differential Revision: https://phabricator.memgraph.io/D600
2017-07-29 18:26:18 +02:00
Teon Banek
160a6866dc Break the query part on Unwind
Summary:
`UNWIND` can come before `MATCH`, so it needs to break query parts. If
it didn't, a query part would incorrectly grab all the matches and plan
them incorrectly. A test for such a case has been added.

Reviewers: florijan

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D598
2017-07-29 18:14:06 +02:00
Mislav Bradac
06d3629fd0 Migrate to new jail faker
Reviewers: mferencevic

Reviewed By: mferencevic

Differential Revision: https://phabricator.memgraph.io/D599
2017-07-29 18:06:44 +02:00