Commit Graph

1089 Commits

Author SHA1 Message Date
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
Mislav Bradac
592ba4df98 Minor cleanup
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D513
2017-06-28 15:56:05 +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
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
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
Teon Banek
f89ef14823 Fix a minor typo when logging
Reviewers: mferencevic, mislav.bradac

Reviewed By: mferencevic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D507
2017-06-23 09:30:40 +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
Marko Budiselic
ab250d1af7 Preparation for merge into memgraph. 2017-06-20 14:32:32 +02:00
Mislav Bradac
4a15972662 Add keyword label test
Reviewers: buda

Reviewed By: buda

Differential Revision: https://phabricator.memgraph.io/D499
2017-06-20 13:50:08 +02:00
Matej Gradiček
83d8673afb measuring latency
Reviewers: buda

Reviewed By: buda

Differential Revision: https://phabricator.memgraph.io/D494
2017-06-20 11:12:04 +00: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
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
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
Marko Budiselic
a01cf408bf User Technical Docs update.
Summary: Add single query length limitation.

Reviewers: teon.banek, florijan

Reviewed By: florijan

Subscribers: pullbot, buda

Differential Revision: https://phabricator.memgraph.io/D491
2017-06-19 09:35:29 +02:00
Marko Budiselic
187c831eb7 TCK suite update.
Summary: TCK suite update.

Reviewers: mislav.bradac

Reviewed By: mislav.bradac

Differential Revision: https://phabricator.memgraph.io/D490
2017-06-16 16:56:36 +02:00
Marko Budiselic
dd3c7b4e75 Documentation update.
Summary: Docker mount documentation update.

Reviewers: teon.banek, florijan

Reviewed By: teon.banek

Subscribers: pullbot, buda

Differential Revision: https://phabricator.memgraph.io/D486
2017-06-16 16:42:56 +02:00
Marko Budiselic
8d7f44a498 Config update.
Summary: Testing config path update.

Reviewers: mislav.bradac

Reviewed By: mislav.bradac

Differential Revision: https://phabricator.memgraph.io/D488
2017-06-16 16:28:26 +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
Marko Budiselic
a8a2a8c40d Changelog update.
Summary: PreAlpha release changelog update.

Reviewers: teon.banek, florijan, mislav.bradac

Reviewed By: teon.banek, mislav.bradac

Subscribers: pullbot, buda

Differential Revision: https://phabricator.memgraph.io/D467
2017-06-16 16:07:23 +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
13e7988c5f Testing config
Summary: Testing config update. AST cache false.

Reviewers: mislav.bradac

Reviewed By: mislav.bradac

Subscribers: buda

Differential Revision: https://phabricator.memgraph.io/D487
2017-06-16 15:40:32 +02:00
Dominik Gleich
f034c29724 Previous iterator should only be set when the node is alive.
Summary: There was a big performance hit induced when removing consecutive nodes from the concurrent list. The reason why it was happening is that the iterator has a pointer to previous node, and uses that pointer to re-link the whole list after the deletion. That node wasn't alive because it was deleted earlier and was always being updated to the next deleted entry in the list while incrementing the iterator. This behaviour caused find_and_disconnect method to be invoked, which has an O(n) complexity. That made our removal of O(n) entries from the list run in O(n^2) time, which is obviously slow.

Reviewers: buda, mislav.bradac, florijan

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D483
2017-06-16 15:28:05 +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
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
Teon Banek
3f08614c3d Docs - alpha user documentation work
Summary:
A lot of style changes. Major content changes are the following:
- Bolt and "interface" stuff moved to quick-start (not so quick anymore?)
- removed the "Memgraph is 100% Bolt compliant" and client-compatiblity claims because they are probably not true and aren't necessary
- moved "Limitations" to the bottom
- Python quickstart - moved explanations into the code, moved DB cleanup to the end (natural data flow)

What still needs work in my opion:
- the table in the "Limitations" part renders horribly (no space between cells)
- heading3 and heading4 are rendered the same in the "QuickStart", which is bad in the "Limitations" section
- I only went through the "Installation" and part of the "QuickStart", still a lot to go

Reviewers: buda, dtomicevic, florijan

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D473
2017-06-16 14:58:05 +02:00
Matej Gradiček
f1e894d107 openCypher_M06 added
Reviewers: buda

Reviewed By: buda

Differential Revision: https://phabricator.memgraph.io/D481
2017-06-16 12:55:03 +00:00
Mislav Bradac
5403b99e18 Remove logger from StrippedQuery
Summary:
benchmark/query/stripped.cpp outputs garbage because of some race
condition in logger. Sometime even crashes, just be sure this
should be removed.

Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D477
2017-06-16 12:13:23 +02:00
Marko Budiselic
e68c3f4e5f Graph gists.
Summary: Add graph gists link to the documentation.

Reviewers: teon.banek, dtomicevic

Reviewed By: teon.banek

Subscribers: pullbot, buda

Differential Revision: https://phabricator.memgraph.io/D472
2017-06-16 10:25:37 +02:00
Teon Banek
21277019e2 Elaborate on which variables are seen by ORDER BY
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D480
2017-06-16 10:21:23 +02:00
Teon Banek
7d00c4eac0 Add query_cost_planner gflag
Reviewers: mislav.bradac, buda, florijan

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D479
2017-06-16 10:20:02 +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
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
Teon Banek
527d69d382 Fix errors with handling SIGSEGV and SIGABRT
Summary:
There were a couple of issues with handling the above 2 signals.

1) Calling `std::exit` from a signal handler is undefined behaviour.

The only defined way for a signal handler to stop the program is calling
one of: `std::_Exit`, `std::abort` or `std::quick_exit`. Neither of them
will completely clean the resources, so a clean exit is not possible.
Since SIGSEGV and SIGABRT happen in extraordinary circumstances that we
wish to debug 99% of the time, it makes sense to generate a core dump
which can be inspected by a debugger. Of the 3 termination functions,
only `std::abort` will generate a core dump, so it makes sense to use
that to stop the program.

Also, since we are now aborting as is the default behaviour on SIGSEGV
and SIGABRT, it becomes questionable why have a custom handler at all.

2) Raising an exception inside a signal handler is undefined behaviour

Although the handler by itself does not raise an exception, it is
possible for the logging facility to raise one. This is a real case when
logging a stack trace in particular. Stack trace is generated by
creating a string "<function name> <line location>". It is possible that
a function name will contain '{}' somewhere inside. This is usually the
case with anonymous functions. The generated string is then passed to
logging, which uses the `fmt` library to fill '{}' with remaining
arguments. Since only a single argument (the stack trace string) is
passed for formatting, naturally the `fmt::format` throws an exception,
that it is missing a format argument.

We could provide an overload which takes a single string, but that
defeats the purpose of `fmt::format` raising an exception in regular
code if we forget to pass an argument. Another solution is to escape the
whole stack trace string, so it is valid for formatting, but this only
complicates the handler even further. The simplest solution is to send
the stack trace to `stderr` and avoid logging altogether.

Simplify Shutdown, so it can be used in a signal handler

Reviewers: florijan, mferencevic, buda, mislav.bradac

Reviewed By: mferencevic, buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D474
2017-06-16 08:53:07 +02:00
Teon Banek
13ae13bf43 Make asserts abort the program instead of exiting cleanly
Summary:
Since assertions should signify an abnormal program condition, it makes
sense for them to call `std::abort`. This way, we'll get a core dump
which can be inspected in a debugger.

Update utils/assert.hpp documentation

Reviewers: florijan, buda, mislav.bradac

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D475
2017-06-16 08:52:36 +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
florijan
b6da65b9e7 Skiplist - GC - race condition fix
Summary: An unpleasant race-condition detected. Solution proposed. It's not very pretty. Perhaps consider using the ConcurrentPushQueue. Not 100% sure, but it should make the GC code easier to work with.

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

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D469
2017-06-14 16:16:53 +02:00
Matej Ferencevic
928f52af47 Added alpha documentation bundle script.
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D470
2017-06-14 15:54:15 +02:00
Marko Budiselic
c081281944 Docker mount volume documentation.
Summary: Add snapshots mount documentation. By default, build_interpreter takes alpha.conf as a config file.

Reviewers: teon.banek, dtomicevic

Reviewed By: teon.banek

Subscribers: pullbot, buda

Differential Revision: https://phabricator.memgraph.io/D464
2017-06-14 10:15:05 +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