Commit Graph

926 Commits

Author SHA1 Message Date
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
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
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
c8e25987b8 Add asserts to placeholder
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D463
2017-06-13 14:54:17 +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
Marko Budiselic
c737c73d05 Antlr download.
Summary: Bug fix. Don't create a backup file on new wget download.

Reviewers: teon.banek

Reviewed By: teon.banek

Subscribers: pullbot, buda

Differential Revision: https://phabricator.memgraph.io/D462
2017-06-13 12:48:10 +02:00
florijan
9e6260d0c3 tx::Engine - commit log encapsulation
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D460
2017-06-13 12:32:48 +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
Teon Banek
c6b2336f04 Silence ctest when running for coverage
Summary:
There's no need to see the results of tests, since we are only running
ctest to generate code coverage reports.

Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D461
2017-06-13 11:54:43 +02:00
Marko Budiselic
418bbea69d Update of package_deploy script.
Summary: Add --skip-deploy parameter to release/package_deploy script. Packaged file renaming.

Reviewers: teon.banek, mferencevic

Reviewed By: teon.banek

Subscribers: pullbot, buda

Differential Revision: https://phabricator.memgraph.io/D459
2017-06-13 11:00:18 +02:00
Marko Budiselic
4b358ec02e Quick start docs.
Summary: Quick start section. Still work in progress.

Reviewers: teon.banek

Reviewed By: teon.banek

Subscribers: pullbot, buda

Differential Revision: https://phabricator.memgraph.io/D450
2017-06-13 10:17:16 +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
Mislav Bradac
d46945f259 Make GraphDbTypes const
Reviewers: florijan

Reviewed By: florijan

Differential Revision: https://phabricator.memgraph.io/D456
2017-06-12 15:24:30 +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
Teon Banek
025e557204 Validate the --num_workers flag
Reviewers: dgleich, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D449
2017-06-09 16:16:38 +02:00
Marko Budiselic
c20557f3c7 Installation docs.
Summary: Basic How to installation document.

Reviewers: teon.banek, florijan

Reviewed By: teon.banek

Subscribers: pullbot, buda

Differential Revision: https://phabricator.memgraph.io/D445
2017-06-09 15:54:05 +02:00
Teon Banek
0f0c5cb8b7 Add some upcoming Cypher features to the docs
Reviewers: florijan, mislav.bradac, buda, dtomicevic

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D444
2017-06-09 15:23:44 +02:00
Dominik Gleich
972c62e102 Fix signals. Add recovery status.
Reviewers: teon.banek, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D451
2017-06-09 13:25:24 +02:00
Dominik Gleich
9f4e6243d8 Fix.
Reviewers: teon.banek

Reviewed By: teon.banek

Differential Revision: https://phabricator.memgraph.io/D448
2017-06-09 11:40:06 +02:00
Dominik Gleich
0fb29a7ce0 Add release logging without core dump.
Reviewers: buda, teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D447
2017-06-09 11:26:19 +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
532f38ca3f Add a short chapter on Bolt Protocol
Summary:
Do some minor corrections to openCypher docs

Add links to Bolt drivers in our documentation

Reviewers: florijan, buda, mferencevic, dtomicevic

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D440
2017-06-08 16:31:08 +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
Marko Budiselic
f84f9af244 Alpha package scripts.
Summary: Alpha package scripts. Alpha version is going to be shipped within docker.

Reviewers: teon.banek, mferencevic

Reviewed By: teon.banek

Subscribers: pullbot, buda

Differential Revision: https://phabricator.memgraph.io/D436
2017-06-08 14:15: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
Teon Banek
9c6c0c655b Add technical documentation on openCypher
Summary:
This is a basic overview of various supported features of openCypher in
Memgraph. A lot of the documentation refers to Neo4j manual. This needs to
change in the future.

Reviewers: buda, dtomicevic, mislav.bradac, florijan

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D439
2017-06-08 09:42:43 +02:00