Commit Graph

1089 Commits

Author SHA1 Message Date
Teon Banek
1356fd5391 Use the label index with fewest vertices for ScanAll
Reviewers: florijan, mislav.bradac

Reviewed By: florijan, mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D415
2017-05-31 15:41:21 +02:00
Marko Budiselic
d07eff9f43 Init of end user technical documentation.
Summary: Init of end user technical documentation.

Reviewers: dtomicevic, teon.banek, mferencevic

Reviewed By: dtomicevic, teon.banek

Subscribers: pullbot, buda

Differential Revision: https://phabricator.memgraph.io/D407
2017-05-31 15:38:26 +02:00
Marko Budiselic
1438ff97c1 First stress test version.
Summary: Stress test: create vertices.

Reviewers: mislav.bradac, mferencevic, florijan

Reviewed By: mislav.bradac

Subscribers: teon.banek, pullbot, buda

Differential Revision: https://phabricator.memgraph.io/D402
2017-05-31 15:31:33 +02:00
Teon Banek
d706a91b1b Don't make an Expansion of single node if it is expanded
Summary:
We would redundantly generate an Expansion for the first node if it was part of
an expand. For example, the pattern `(n) -[r]- (m)` would generate
`Expansion{n}` and `Expansion{n, r, m}`, when only the latter is enough. This
change corrects that behaviour by dropping the first Expansion.

Reviewers: florijan, mislav.bradac

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D412
2017-05-31 14:07:56 +02:00
Teon Banek
62f6a58c32 Generalize MakeLogicalPlan with regards to planner
Summary:
This change modifies the planning API to be more general, in order to support
picking different planning strategies. The current planning strategy has been
named RuleBasedPlanner.

Reviewers: florijan, mislav.bradac

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D411
2017-05-31 14:07:41 +02:00
Marko Budiselic
fd19f76cba Build, Package & Deploy script.
Summary: Build, Packege & Deploy script.

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

Reviewed By: dgleich

Subscribers: dgleich, pullbot, buda

Differential Revision: https://phabricator.memgraph.io/D397
2017-05-31 10:31:12 +02:00
Mislav Bradac
2005056cd5 Measure times in hardcoded queries
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D410
2017-05-30 19:47:35 +02:00
Mislav Bradac
34b6afdf92 Measure antlr time
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D409
2017-05-30 17:29:55 +02:00
Teon Banek
ffcc8b8d12 Change CollectProduce to immediately return results
Reviewers: florijan, mislav.bradac

Reviewed By: florijan, mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D406
2017-05-30 16:55:37 +02:00
Mislav Bradac
a5e2ccb94f Change working dir to dir of memgraph binary
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D408
2017-05-30 16:49:56 +02:00
florijan
7403338f38 Query - Aggregation with no input, SQL-style handling.
Reviewers: mislav.bradac, buda, teon.banek

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D400
2017-05-30 16:01:35 +02:00
Teon Banek
e631eb4eb2 Rename directions from LEFT/RIGHT to IN/OUT
Reviewers: florijan, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D405
2017-05-30 13:14:34 +02:00
Teon Banek
f9bcd6d760 Replace Atoms with Symbols in Expand operator
Reviewers: florijan, mislav.bradac

Reviewed By: florijan

Differential Revision: https://phabricator.memgraph.io/D404
2017-05-30 12:10:17 +02:00
Dominik Gleich
db5f4469fe Change time to duration.
Reviewers: florijan

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D403
2017-05-30 10:39:58 +02:00
matej.gradicek
5406882bde visibility tests
Summary:
Merge branch 'dev' into mvcc_visibility_tests

visibility added

Reviewers: dgleich, florijan

Reviewed By: dgleich

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D377
2017-05-29 14:43:41 +00:00
Teon Banek
d72d3061eb Reconstruct vertices iterable in-place
Summary:
Since the vertices iterable used in ScanAllCursor may be lazily
generated, it needs to be recreated, instead of simply calling
`begin()`. In our current implementation, we use cppitertools which do
not have move assignment implemented. Because of that, a hackish
in-place destruction and construction is used to reset the iterable.

Reviewers: florijan, mislav.bradac, dgleich, buda

Reviewed By: dgleich

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D401
2017-05-29 15:55:47 +02:00
Teon Banek
74b082f050 Preprocess Ast to QueryParts and plan ScanAllByLabel
Summary:
Mention the non-existent function name in semantic error. Don't merge optional
matches into one Matching, because it is an error to treat multiple optional
matches as a single optional match. Document new structures and functions. Add
not so smart ScanAllByLabel generation.

Reviewers: mislav.bradac, buda, florijan, lion

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D394
2017-05-26 15:57:45 +02:00
Marko Budiselic
d3d8264fae Release dockerfile update, build argument is supported. CHANGELOG update.
Summary: Release dockerfile update, build argument is supported. CHANGELOG update.

Reviewers: teon.banek, dgleich, mislav.bradac

Reviewed By: teon.banek, dgleich

Subscribers: pullbot, buda

Differential Revision: https://phabricator.memgraph.io/D396
2017-05-25 12:01:17 +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
florijan
04670f7328 Query - separate timing for planning and execution
Reviewers: mislav.bradac, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D393
2017-05-23 17:03:46 +02:00
Teon Banek
fbf028a438 Update the benchmark to commit t1 before starting t2
Summary:
The previous behavior was incorrect, since the second transaction
cannot see the record created in the first, because it commited later.

Reviewers: florijan, buda, dgleich

Reviewed By: dgleich

Subscribers: pullbot, matej.gradicek

Differential Revision: https://phabricator.memgraph.io/D390
2017-05-22 10:41:37 +02:00
Teon Banek
d016472c3a Add ScanAllByLabel operator.
Summary:
Replace NodeAtom with Symbol inside ScanAll. Move ScanAllCursor outside of
ScanAll class and make it generic with regards to vertices it produces.

Reviewers: mislav.bradac, florijan

Reviewed By: mislav.bradac, florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D387
2017-05-22 09:28:42 +02:00
Mislav Bradac
839d63284b Implement STARTS WITH, ENDS WITH, CONTAINS
Reviewers: buda, teon.banek, florijan

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D389
2017-05-19 19:28:06 +02:00
Mislav Bradac
f9cd87bb46 Implement collect aggregation
Reviewers: teon.banek, florijan

Reviewed By: teon.banek, florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D386
2017-05-19 17:24:12 +02:00
Teon Banek
28fbeb8e9d Raise if MATCH is after OPTIONAL MATCH
Reviewers: florijan, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D383
2017-05-19 16:27:21 +02:00
Mislav Bradac
6a027ea3b2 Throw on key appearing twice in map literal
Reviewers: teon.banek

Reviewed By: teon.banek

Differential Revision: https://phabricator.memgraph.io/D388
2017-05-19 16:17:40 +02:00
Dominik Gleich
aa6601407d 'Memory leak' fix.
Summary: Memgraph seemed like it leaked memory while in fact it was just keeping it close by. By forcing release of free memory on top of heap back to the operating system we are making sure we are not using more memory than we have to in any given moment.

Reviewers: mferencevic, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D385
2017-05-19 13:25:51 +02:00
Marko Budiselic
a7ce3686d8 Continuous integration status script.
Summary: Continuous integration script. First goal is to post status messages on Phabricator (status file has to be generated in order to post messages with Jenkins plugin).

Reviewers: mislav.bradac, mferencevic, teon.banek

Reviewed By: teon.banek

Subscribers: buda

Differential Revision: https://phabricator.memgraph.io/D382
2017-05-19 11:13:58 +02:00
florijan
97638d3327 Query - grammar changed to support '1 IN [[1, 2]][0]'
Reviewers: mislav.bradac, teon.banek, buda

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D381
2017-05-19 09:09:12 +02:00
Marko Budiselic
6ee2be3a48 Init of Change Log.
Summary: The Change Log is initialized. For every new feature, improvement, bug fix and anything else that is relevant, please update the CHANGELOG.md file.

Reviewers: teon.banek, mislav.bradac, florijan, dgleich

Reviewed By: dgleich

Subscribers: pullbot, buda

Differential Revision: https://phabricator.memgraph.io/D379
2017-05-18 16:58:40 +02:00
florijan
95ce34cc0a Mvcc.GcDeleted bugfix and test
Summary: Changed mvcc::VersionList::GcDeleted to look for the oldest visible record.

Reviewers: teon.banek, buda, dgleich

Reviewed By: teon.banek, dgleich

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D378
2017-05-18 16:02:42 +02:00
Teon Banek
663d78feaa Handle expanding from Null vertex
Summary:
This fixes a bug when the MATCH clause would follow an OPTIONAL MATCH.
In case when the optional part would fail to generate results, expanding
would cause an error.

Reviewers: florijan, mislav.bradac, buda

Reviewed By: mislav.bradac, buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D372
2017-05-18 09:04:16 +02:00
Dominik Gleich
22ea809c67 Fix tck - and all of memgraph in the process.
Summary:
When running tck tests there was a peculiar behavior where sometimes some queries worked, and sometimes they failed. Nothing was failing when memgraph was restarted between each query (scenario) - which points to MATCH DETACH DELETE not working correctly.

What was happening is the following: some transaction would update the record in version list and set it's expiry to it's id. Along with that some transaction would query the mentioned record - and would set the hints flags for that expiration transaction status (which was aborted - which is fine at this moment). After some while, because the record is not really deleted because it's not aborted some other transaction would modify it's expiry transaction (this time making the transaction commited), but because the hints flags were not updated - they would still return the status for the old transaction - which was aborted. This made some records available even though they were deleted.

Reviewers: mislav.bradac, florijan, teon.banek, matej.gradicek, buda

Reviewed By: buda

Subscribers: buda, lion, pullbot

Differential Revision: https://phabricator.memgraph.io/D370
2017-05-17 15:27:40 +02:00
Teon Banek
8380d3694f Raise semantic error when redeclaring node in MERGE
Summary:
openCypher expects MERGE to behave like CREATE. As such, it shouldn't be
allowed to refer to declared nodes, while providing labels and
properties.

Reviewers: florijan, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D373
2017-05-17 15:08:38 +02:00
Teon Banek
30a4f40093 Skip Null in SET and REMOVE clauses
Summary:
openCypher expects removing/setting properties and labels on Null
vertices/edges does not produce an error. Instead, Nulls are simply
skipped.

Reviewers: florijan, mislav.bradac, buda

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D375
2017-05-17 15:07:03 +02:00
Teon Banek
8d8ef19694 Raise in ParseDouble with empty string or float overflow
Summary:
The check is made more robust by using the `fail` accessor along with
`eof`.

Reviewers: florijan, buda, mislav.bradac, dgleich

Reviewed By: dgleich

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D376
2017-05-17 14:52:42 +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
Teon Banek
8cdf87e109 Bind UNWIND symbols during planning
Reviewers: florijan, mislav.bradac, buda

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D371
2017-05-17 10:37:12 +02:00
Dominik Gleich
842901ecd2 LabelProperty index.
Summary:
Add return values.

After merge.

Inital working version. Still missing comments.

Update documentation.

Add checking for previous vlist and value equality.

After merge.

Remove functor, add boolean ffunction.

Build index.

More functionality. Start implementing tests.

Add tests.

Reviewers: matej.gradicek, mislav.bradac, mferencevic, buda, florijan

Reviewed By: mislav.bradac, buda, florijan

Subscribers: lion, florijan, teon.banek, buda, pullbot

Differential Revision: https://phabricator.memgraph.io/D355
2017-05-16 16:33:20 +02:00
Dominik Gleich
4b712595d9 Global thread pool added.
Summary: Global thread pool implementation.

Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D369
2017-05-16 16:23:55 +02:00
Teon Banek
23ab2b41a3 Refactor ExpressionEvaluator to classic visitor
Reviewers: florijan, mislav.bradac, buda

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D368
2017-05-16 15:33:47 +02:00
matej.gradicek
f74ba586b2 Implemented mvcc tests as discused with flor(two different transactions operations)
Reviewers: florijan, buda, dgleich

Reviewed By: florijan, buda

Subscribers: dtomicevic, teon.banek, buda, pullbot

Differential Revision: https://phabricator.memgraph.io/D359
2017-05-16 12:09:29 +00:00
Teon Banek
15d7226515 Add classic and hierarchical visiting
Summary:
Merge utils/visitor directory into single file.
Rename Visitor to HierarchicalVisitor.
Add regular Visitor.
Split HierarchicalVisitor into LeafVisitor and CompositeVisitor.
Add more documentation on visitor pattern.
Make PostVisit and Visit return bool.

Reviewers: florijan, mislav.bradac, buda

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D364
2017-05-16 12:35:09 +02:00
Matej Gradiček
5e7b039bcd Added --single-scenario, --single-feature and --single-fail flags in test_executor
Reviewers: buda

Reviewed By: buda

Differential Revision: https://phabricator.memgraph.io/D367
2017-05-16 09:04:22 +00:00
Matej Gradiček
2d0fcc82e3 --graphs-root merged with --root option
Reviewers: mferencevic, buda

Reviewed By: mferencevic

Differential Revision: https://phabricator.memgraph.io/D365
2017-05-16 08:58:22 +00:00
Matej Ferencevic
9640633dd1 Loosen up handshake size checks to accept javascript clients.
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D366
2017-05-16 10:55:19 +02:00
Mislav Bradac
3e6fa7bd51 If multiple memgraph binaries, run newest
Reviewers: buda

Reviewed By: buda

Differential Revision: https://phabricator.memgraph.io/D363
2017-05-15 09:53:48 +02:00
Teon Banek
87e5dc0dfb Plan '*' in RETURN and WITH
Summary:
Make Symbol members read only.
Check WITH/RETURN * in SymbolGenerator.
Test semantic checks for WITH/RETURN *.
Sort expanded user identifiers by name.
Test planning WITH/RETURN *.

Reviewers: buda, florijan, mislav.bradac

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D357
2017-05-12 13:05:40 +01:00
Teon Banek
cee2405f85 Add a script for filtering failed tck scenarios
Reviewers: buda, mislav.bradac, matej.gradicek

Reviewed By: buda, mislav.bradac, matej.gradicek

Differential Revision: https://phabricator.memgraph.io/D361
2017-05-12 09:50:18 +01:00
Mislav Bradac
f82bda6c0c Implement Range function
Reviewers: teon.banek, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D358
2017-05-10 17:12:15 +02:00