Commit Graph

429 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
Mislav Bradac
d608d523c5 Add CreateIndex conversion to ast
Reviewers: florijan, teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D522
2017-07-06 13:32:37 +02:00
florijan
c22ac38ea2 GraphDbAccessor - label+property index cardinalities for exact value and value ranges
Summary:
- added functionality to `GraphDbAccessor` for cardinality estimates
- changed all `GraphDbAccessor::Count...` functions to return `int64_t`
- added the need functionality into `LabelPropertyIndex`
- modified `SkipList::position_and_count` to accept a custom `equals` function. Equality could not be implemented using only the custom `less` because it compares a templated `TItem` with skiplist element type `T`, and is therefore not symetrical.

Reviewers: teon.banek, buda, mislav.bradac

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D521
2017-07-06 10:22:19 +02:00
florijan
feb854d0c7 Skiplist::PositionAndCount refactor and test
Summary:
 - refactored so `less` is used instead of `greater`
 - added a fuzzy unit test

Reviewers: mislav.bradac, buda, teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D519
2017-07-05 12:02:12 +02:00
Marko Budiselic
e7111b286a Property based tests registration.
Summary: Register property based tests to ctest.

Reviewers: matej.gradicek

Reviewed By: matej.gradicek

Subscribers: pullbot, buda

Differential Revision: https://phabricator.memgraph.io/D517
2017-07-04 11:06:10 +02:00
Teon Banek
1841ff9616 Add operators for getting nodes by label-property index
Summary:
Add ScanAllByLabelPropertyRange operator
This operator uses the label + property indexing feature to iterate over
the vertices. The property value of each vertex is checked whether it is
inside the given range of values. The range is inclusive from both
sides. If the value isn't in range, the vertex is filtered out.

This manual filtering should be replaced by a database API when it
becomes available.

Add ScanAllByLabelPropertyValue operator

Reviewers: florijan, mislav.bradac, buda

Reviewed By: florijan, mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D503
2017-07-03 11:03:46 +02:00
Teon Banek
f5db9d65b0 Add CreateIndex operator
Reviewers: florijan, mislav.bradac, buda

Reviewed By: florijan, buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D516
2017-07-03 11:03:15 +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
Marko Budiselic
5b1fde2a98 Credit Card Fraud Detection Gist
Summary: Add Credit Card Fraud Detection as a TCK feature.

Reviewers: matej.gradicek, teon.banek

Reviewed By: teon.banek

Subscribers: pullbot, buda

Differential Revision: https://phabricator.memgraph.io/D514
2017-06-29 16:27:49 +02:00
Marko Budiselic
530ab30a33 tests/qa/init cleanup.
Summary: tests/qa/init cleanup.

Reviewers: teon.banek, mferencevic

Reviewed By: teon.banek

Subscribers: pullbot, buda

Differential Revision: https://phabricator.memgraph.io/D512
2017-06-27 22:20:38 +02:00
Mislav Bradac
3119ae5343 Supstitute named expressions in ast cache
Reviewers: buda, teon.banek

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D510
2017-06-26 16:33:17 +02:00
Matej Ferencevic
44e948c769 Started TCK cleanup.
Summary:
Changed run script to use built memgraph binary.

Added missing binary check to run script.

Reviewers: buda, teon.banek

Reviewed By: buda, teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D504
2017-06-21 16:49:04 +02:00
Mislav Bradac
3a922de963 Implementation of new lexer
Summary: WORK IN PROGRESS

Reviewers: buda, teon.banek, dgleich

Reviewed By: dgleich

Subscribers: dgleich, pullbot

Differential Revision: https://phabricator.memgraph.io/D496
2017-06-21 16:16:17 +02:00
Mislav Bradac
e86d73eb98 Change keyword symbolic names
Reviewers: mferencevic

Reviewed By: mferencevic

Differential Revision: https://phabricator.memgraph.io/D505
2017-06-21 15:54:06 +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
florijan
19c0dfe084 SkipList - added position_and_count function
Summary: This is the first implementation that seems to work. I am not happy with it's complexity. Might attempt a simpler implementation, at the cost of some performance.

Reviewers: dgleich, buda

Reviewed By: dgleich

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D502
2017-06-21 14:12:29 +02:00
florijan
a726ac0023 Tests - long-running test added
Summary:
Tests - long-running test added

 - common functionality refactor
 - long running tests WIP

tests/stress/common: minor refactor, long_running WIP

tests/stress/long_running - stable single-threaded, unstable concurrent

tests/stress/long_running - added error summary output

test/stress/long_running - add/remove vertex/edge stable multithreaded

test/stress/long_running - added vertex label testing

tests/stress/long_running - time limit added

Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D489
2017-06-21 12:10:36 +02:00
florijan
01d9688273 tests/qa/tests/ - empty folder that's defined as submodule removed 2017-06-21 11:24:26 +02:00
florijan
ad148692c3 Concurrent::PushQueue added
Summary:
PushQueue with concurrent lock-free pushing, and single-threaded deletion. Iteration without modification can also be concurrent. Deletion should NOT be concurrent with iteration and other deletions, but can be concurrent with pushing.

There is no const iteraton at the moment, we can add it when necessary. Also I've not handled std::iterator_traits, might be fun getting into that :D

Reviewers: buda, dgleich, mislav.bradac

Reviewed By: dgleich

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D420
2017-06-21 09:03:33 +02:00
Marko Budiselic
366c2d4520 Merge branch 'qa_merge' into dev 2017-06-20 15:05:56 +02:00
Marko Budiselic
a7cbea3999 .gitignore wasn't updated. 2017-06-20 15:01:11 +02:00
Mislav Bradac
b6ecc5631f Disallow keywords as symbolic names
Reviewers: teon.banek, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D497
2017-06-20 11:58:14 +02:00
florijan
492b4919f1 Concurrent data structures -> multi_X stuff removed. Skiplist cleanup.
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D495
2017-06-20 08:42:20 +02:00
florijan
e28fc6ed41 FLAG 'snapshot_on_destruction' renamed to 'snapshot_on_exit'
Reviewers: teon.banek, buda

Reviewed By: teon.banek, buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D471
2017-06-16 16:25:26 +02:00
Mislav Bradac
1862b04ac2 Fix bug in StrippedQuery
Reviewers: buda, teon.banek

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D482
2017-06-16 15:04:48 +02:00
matej.gradicek
c820b25c9c Changed tmpnam with mkdtemp
Reviewers: dgleich, buda

Reviewed By: dgleich

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D431
2017-06-16 07:49:10 +00: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
Teon Banek
7de8fd4b1b Reorganize logging in memgraph_bolt.cpp
Summary:
Remove utils/stacktrace/log.hpp
The single function defined in log.hpp is used only in
memgraph_bolt.cpp. Therefore, the function has been moved and the file
removed.

Move utils/stacktrace/stacktrace.hpp one level up

Move some logging from memgraph_bolt to Server

Reviewers: buda, dtomicevic

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D465
2017-06-14 10:11: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
Teon Banek
69cfd197d8 Don't raise TypedValueException during query execution
Summary:
Handle TypedValueExceptions in query/plan/operator.cpp

Raise QueryRuntimeException during expression evaluation

Reviewers: florijan, mislav.bradac, buda

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D457
2017-06-13 14:46:56 +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
c12990ae33 DynamicBitset - const correctness, tests, docs
Reviewers: dtomicevic, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D453
2017-06-13 09:18:20 +02:00
Marko Budiselic
47b8a48df2 Python driver test.
Summary: Python driver test. Equivalent to all other driver tests.

Reviewers: mferencevic, teon.banek

Reviewed By: teon.banek

Subscribers: pullbot, buda

Differential Revision: https://phabricator.memgraph.io/D452
2017-06-12 15:53:43 +02:00
Teon Banek
3b88d7429f Visit edge properties during symbol generation
Summary:
This is an obvious bug, caused by an oversight. A test has been added
for this case.

Reviewers: florijan, mislav.bradac, buda

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D455
2017-06-12 15:27:15 +02:00
Marko Budiselic
28173eaa3e Bipartite stress test.
Summary: Bipartite stress test. Common methods useful in the process of testing with python Bolt driver.

Reviewers: mislav.bradac, florijan

Reviewed By: florijan

Subscribers: florijan, pullbot, buda

Differential Revision: https://phabricator.memgraph.io/D423
2017-06-12 10:47:37 +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
Dominik Gleich
1057d253ca Rename config flags.
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D446
2017-06-09 10:52:26 +02:00
Matej Ferencevic
6308ec6a34 Added javascript and java driver tests.
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D438
2017-06-09 10:12:25 +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
Dominik Gleich
141d9b3bb8 Rework of index api. Remove implicit default value of current_state in graph_db_accessor.
Reviewers: buda, florijan

Reviewed By: buda, florijan

Subscribers: mislav.bradac, pullbot

Differential Revision: https://phabricator.memgraph.io/D392
2017-06-07 10:14:55 +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
7278bdff94 Check for aggregation in all Expression types
Summary:
This fixes an issue when aggregations and/or group by expressions
weren't picked up from certain operators. In addition to that, we would
segfault in cases when the `has_aggregation_` is empty. For example,
function calls without arguments: `RETURN PI()`.

Test aggregations inside some operators

Reviewers: florijan, mislav.bradac, buda

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D425
2017-06-06 15:05:43 +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
matej.gradicek
29041eb4d1 Added mvcc tests with one transaction and modified version list update function
Summary: Modified version list update, added mvcc tests for one transaction

Reviewers: dgleich, florijan

Reviewed By: dgleich, florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D360
2017-06-02 07:37:42 +00: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
Teon Banek
2951b6bdcf Simplify using identifiers in RETURN/WITH test macros
Reviewers: florijan, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D414
2017-05-31 15:50:08 +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