Teon Banek
ed802073f6
Make PropertyValue constructors explicit
...
Summary: Depends on D2332
Reviewers: ipaljak, mferencevic
Reviewed By: ipaljak
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2333
2019-09-02 12:31:53 +02:00
Matej Ferencevic
d3b141f3ba
Allocate initial execution memory
...
Reviewers: teon.banek
Reviewed By: teon.banek
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2316
2019-09-02 11:40:38 +02:00
Teon Banek
9f4a7dcddf
Remove PropertyValue::Null
...
Reviewers: ipaljak, mferencevic
Reviewed By: ipaljak
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2332
2019-08-29 09:02:51 +02:00
Teon Banek
02fb644bdc
Resolve unused variables
...
Reviewers: ipaljak, mferencevic
Reviewed By: mferencevic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2330
2019-08-27 16:10:00 +02:00
Teon Banek
a878a11e70
Add FunctionContext to simplify awesome function signature
...
Reviewers: ipaljak, mferencevic
Reviewed By: mferencevic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2327
2019-08-27 13:49:40 +02:00
Teon Banek
023538c19c
Add PoolResource benchmarking in execution and skiplist
...
Summary:
With a pool allocator, lookups in STL set and map are up to 50% faster.
This is probably due to contiguous memory of pooled objects, i.e. nodes
of those containers. In some cases, the lookup outperforms the SkipList.
Insertions are also faster, though not as dramatically, up to 30%. This
does make a significant difference when the STL containers are used in a
single thread as they outperform the SkipList significantly.
Reviewers: mferencevic, ipaljak
Reviewed By: mferencevic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2326
2019-08-27 09:32:01 +02:00
Teon Banek
1fa9d7752c
Fix a bug in Pool::Deallocate
...
Reviewers: mferencevic, ipaljak
Reviewed By: mferencevic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2325
2019-08-27 09:32:00 +02:00
Teon Banek
bb832de608
Prepend MonotonicBufferResource::Buffer to an allocation
...
Summary:
This is a different scheme for setting up a bookkeeping object while
still supporting arbitrary allocation alignment requests. The previous
scheme was simpler as it always allocated a power of 2 bytes, but the
trade-off was increased memory usage. This should waste less memory.
Reviewers: mtomic, mferencevic, ipaljak
Reviewed By: mtomic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2321
2019-08-23 14:18:14 +02:00
Marin Tomic
7e741b8d25
Implement vertex count estimation
...
Reviewers: teon.banek, mferencevic
Reviewed By: teon.banek
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2306
2019-08-22 17:34:00 +02:00
Teon Banek
97b20a9384
Use non-template Value invocation
...
Reviewers: mtomic, mferencevic
Reviewed By: mtomic, mferencevic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2317
2019-08-22 16:20:31 +02:00
Matej Ferencevic
529b7109f7
Use new SkipList for query caches
...
Reviewers: teon.banek, mtomic
Reviewed By: teon.banek
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2305
2019-08-22 14:10:41 +02:00
Matej Ferencevic
a9d2f4842f
Reduce GC CPU usage in storage v2
...
Reviewers: mtomic, teon.banek
Reviewed By: mtomic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2313
2019-08-22 14:09:56 +02:00
Marin Tomic
21d461e77d
Skip deleted vertices when building index
...
Summary:
There's a possible race condition where we add a deleted vertex into
index and garbage collection removes it from main storage before indices are
cleaned-up.
Reviewers: mferencevic, teon.banek
Reviewed By: mferencevic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2314
2019-08-22 10:25:44 +02:00
Teon Banek
4f93632fb8
storage/v2: Add (In|Out)Degree to VertexAccessor
...
Reviewers: mtomic, mferencevic
Reviewed By: mferencevic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2309
2019-08-21 12:58:00 +02:00
Marin Tomic
1ab0b8e0ff
Implement existence constraints
...
Reviewers: teon.banek, mferencevic
Reviewed By: teon.banek, mferencevic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2307
2019-08-20 16:27:36 +02:00
Teon Banek
b8e964a82d
Remove is_transaction_starter_
from Storage::Accessor
...
Reviewers: mferencevic, mtomic
Reviewed By: mferencevic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2308
2019-08-20 12:43:05 +02:00
Matej Ferencevic
d263d0887f
Fix bug in storage v2 GC
...
Reviewers: mtomic, teon.banek
Reviewed By: mtomic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2304
2019-08-19 13:21:35 +02:00
Teon Banek
ce9e2614fa
Invert the result of SetProperty and add documentation
...
Reviewers: mtomic, mferencevic
Reviewed By: mferencevic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2297
2019-08-13 16:21:33 +02:00
Matija Santl
b684e697fd
Adjust raft constants for long running tests
...
Summary:
Based on the recent builds (https://apollo.memgraph.io/runs/642045/ ,
https://apollo.memgraph.io/runs/642700/ https://apollo.memgraph.io/runs/640896/
https://apollo.memgraph.io/runs/640538/ ) `ha` stress tests fail.
Every tests that failed, has a re-election in progress. I'm bumping election
timeout constatns in order to give the cluster more time to do what it needs to
do before going in the state where it fails.
Reviewers: ipaljak
Reviewed By: ipaljak
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2292
2019-08-13 10:40:24 +02:00
Teon Banek
f7575eb112
Add utilities for type checking awesome MG functions
...
Reviewers: mtomic, msantl
Reviewed By: mtomic, msantl
Subscribers: buda, pullbot
Differential Revision: https://phabricator.memgraph.io/D2259
2019-08-12 16:24:24 +02:00
Teon Banek
34f80722c2
Return Error::DELETED_OBJECT from CreateEdge instead of aborting
...
Reviewers: mtomic, mferencevic
Reviewed By: mferencevic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2295
2019-08-09 12:38:20 +02:00
Teon Banek
e18cb7b4c7
Make Result constructors implicit
...
Reviewers: mferencevic, mtomic, msantl
Reviewed By: mferencevic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2293
2019-08-08 15:47:35 +02:00
Teon Banek
5bae9c6457
Move storage::Result to utils
...
Summary:
Utils now contain a BasicResult implementation which supports different
types of error. This will make it useful for other parts of the code as
well as during the transition from old to new storage.
Reviewers: mtomic, msantl, mferencevic
Reviewed By: mferencevic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2291
2019-08-08 14:37:06 +02:00
Teon Banek
1a20c557b8
Update storage API docs with thrown exceptions
...
Summary:
The documentation includes `std` exceptions like `std::bad_alloc` or
`std::system_error`, for which there's probably nothing we can do. This
may seem unnecessary, but it will be really helpful when writing the C
API for interfacing with custom modules and plugins, as well as when
switching to storage v2 API.
In general, we should start updating the documentation of functions
which may throw exceptions. This ought to be enforced in code review, so
that the implementation and documentation are kept in sync.
Reviewers: mferencevic, mtomic, msantl
Reviewed By: mferencevic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2288
2019-08-07 15:58:38 +02:00
Teon Banek
a3d99d7628
Update Code Review Guidelines with Exceptions section
...
Reviewers: mtomic, mferencevic, msantl, ipaljak, vkasljevic, dlozic, buda
Reviewed By: mferencevic, msantl, buda
Differential Revision: https://phabricator.memgraph.io/D2286
2019-08-07 15:58:38 +02:00
Matej Ferencevic
fb6dc83ef4
Replace bswap with proper endian functions
...
Reviewers: teon.banek
Reviewed By: teon.banek
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2290
2019-08-07 15:45:03 +02:00
Teon Banek
134525851b
Expose Id mappings from accessor-less Storage
...
Reviewers: mtomic, mferencevic
Reviewed By: mferencevic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2285
2019-08-06 14:30:21 +02:00
Teon Banek
ed9f82bcf4
Add a common VerticesIterable wrapper
...
Summary:
This ought to simplify the code which needs to work with any kind of
vertex iteration, be it through an index store or regular.
Reviewers: mtomic, mferencevic
Reviewed By: mferencevic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2258
2019-08-06 13:30:31 +02:00
Matej Ferencevic
bad1f8b525
Remove copy constructor/assignment from SkipList accessors
...
Reviewers: teon.banek
Reviewed By: teon.banek
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2230
2019-08-06 11:18:31 +02:00
Teon Banek
3a95a3c29d
Prepare utils/memory for switching to libstdc++-9
...
Reviewers: mtomic, mferencevic
Reviewed By: mtomic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2246
2019-07-26 15:47:16 +02:00
Teon Banek
124a44731d
Fix includes in utils/file.hpp
...
Reviewers: mtomic, mferencevic
Reviewed By: mtomic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2245
2019-07-26 15:47:15 +02:00
Teon Banek
fc493e36ff
Add lvalue and rvalue getters to storage::Result
...
Reviewers: mtomic, mferencevic
Reviewed By: mtomic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2242
2019-07-26 15:47:14 +02:00
Marin Tomic
35587cddbd
[StorageV2] Implement label and label-property indices
...
Reviewers: mferencevic, teon.banek
Reviewed By: teon.banek
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2225
2019-07-26 12:23:18 +02:00
Teon Banek
6a2dc1eb9d
cmake: Allow absolute paths in define_add_lcp
...
Reviewers: mtomic, mferencevic
Reviewed By: mtomic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2240
2019-07-25 16:45:24 +02:00
Teon Banek
adc4ebacff
Make (Edge|Vertex)Accessor methods const as appropriate
...
Reviewers: mtomic, mferencevic
Reviewed By: mtomic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2232
2019-07-24 09:46:24 +02:00
Teon Banek
867f30d9b3
Add VerticesIterable to storage/v2
...
Reviewers: mtomic, mferencevic
Reviewed By: mtomic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2229
2019-07-23 13:04:16 +02:00
Marin Tomic
ffa76e59c9
Implement deferred vertex/edge deletion
...
Summary: this will make GC for indices easier
Reviewers: teon.banek, mferencevic
Reviewed By: teon.banek, mferencevic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2223
2019-07-23 09:52:54 +02:00
Marin Tomic
08bf993a47
Add a global storage lock in storage v2
...
Reviewers: mferencevic, teon.banek
Reviewed By: mferencevic, teon.banek
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2202
2019-07-22 15:05:44 +02:00
Marin Tomic
5a3e98badd
Implement Synchronized<T> utility
...
Reviewers: mferencevic, teon.banek
Reviewed By: mferencevic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2222
2019-07-22 14:55:21 +02:00
Matej Ferencevic
d7d0963434
Implement explicit types in storage v2
...
Reviewers: teon.banek, mtomic
Reviewed By: teon.banek
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2224
2019-07-22 14:16:02 +02:00
Teon Banek
e83abaaa5a
Add non-template Value getters to PropertyValue
...
Reviewers: mtomic, mferencevic
Reviewed By: mtomic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2216
2019-07-22 13:36:44 +02:00
Matej Ferencevic
e9a7623288
Implement name to id mapper in storage v2
...
Reviewers: teon.banek, mtomic
Reviewed By: mtomic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2217
2019-07-19 11:24:27 +02:00
Ivan Paljak
fa4c303af6
Add HA normal operation long running test to daily build
...
Summary: Currently set to run for 2 hours.
Reviewers: mferencevic
Reviewed By: mferencevic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2206
2019-07-18 16:53:07 +02:00
Matej Ferencevic
10136f43dc
Replace unordered_map with map in storage v2
...
Summary:
`std::unordered_map` is 56 bytes in size, `std::map` is 48 bytes in size.
Also, `std::map` doesn't require the key type to be hashable.
Reviewers: mtomic, teon.banek
Reviewed By: teon.banek
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2218
2019-07-18 13:43:12 +02:00
Matej Ferencevic
111dd8bf19
Remove distributed
...
Reviewers: teon.banek
Reviewed By: teon.banek
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2213
2019-07-17 15:23:42 +02:00
Teon Banek
59b3f84eb9
Set [[nodiscard]] attribute on storage::Result
...
Reviewers: mtomic, mferencevic
Reviewed By: mferencevic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2214
2019-07-17 15:11:29 +02:00
Teon Banek
e7b1d1aa0c
Add std::hash for V2 (Edge|Vertex)Accessor
...
Reviewers: mferencevic, mtomic
Reviewed By: mferencevic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2212
2019-07-17 13:37:26 +02:00
Matej Ferencevic
4e1c7c9e34
Rename Return
to Value
in storage v2 Result
...
Reviewers: mtomic, teon.banek
Reviewed By: teon.banek
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2199
2019-07-17 12:33:39 +02:00
Matej Ferencevic
b365037e23
Cleanup locks
...
Summary: Move RWLock and replace exceptions with `CHECK`s
Reviewers: mtomic, teon.banek
Reviewed By: mtomic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2205
2019-07-17 10:33:44 +02:00
Matej Ferencevic
1bc062a946
Add changelog for version 0.15
...
Reviewers: teon.banek
Reviewed By: teon.banek
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2210
2019-07-16 17:32:36 +02:00