Commit Graph

1902 Commits

Author SHA1 Message Date
florijan
bdc7ec9b71 Create a local distributed test based on the credit card fraud demo.
Reviewers: msantl, mtomic

Reviewed By: msantl

Differential Revision: https://phabricator.memgraph.io/D1289
2018-03-09 13:52:42 +01:00
florijan
42ca81eb01 Use custom future that waits on destruct
Reviewers: teon.banek, dgleich

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1286
2018-03-09 10:16:17 +01:00
florijan
848749cf25 Fix and rename REPL
Summary: Fix and rename REPL

Reviewers: teon.banek

Reviewed By: teon.banek

Differential Revision: https://phabricator.memgraph.io/D1284
2018-03-08 10:58:43 +01:00
Marin Tomic
68c68655cc Fix transaction id offset
Summary: ^^

Reviewers: mferencevic

Reviewed By: mferencevic

Differential Revision: https://phabricator.memgraph.io/D1283
2018-03-07 16:49:55 +01:00
Marin Tomic
0013c80881 Change transaction id distribution strategy
Summary: this will make delete query more efficient

Reviewers: mferencevic, mculinovic

Reviewed By: mferencevic

Differential Revision: https://phabricator.memgraph.io/D1282
2018-03-07 14:47:19 +01:00
Matija Santl
b8685509aa Add distributed cartesian test
Summary: Cartesian test

Reviewers: teon.banek, florijan

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1279
2018-03-07 11:17:19 +01:00
Matija Santl
011b653ce6 Fix RemoteProduceRpcServer OngoingProduce
Summary: Create a map entry with correct key (tx_id and plan_id).

Reviewers: teon.banek, florijan

Reviewed By: teon.banek

Subscribers: mferencevic

Differential Revision: https://phabricator.memgraph.io/D1278
2018-03-06 16:11:33 +01:00
Marin Tomic
5637703317 add strata v1 scenario
Reviewers: mculinovic, mferencevic

Reviewed By: mferencevic

Subscribers: pullbot, buda

Differential Revision: https://phabricator.memgraph.io/D1266
2018-03-06 11:20:39 +01:00
Marko Culinovic
89cf8ca077 Add connected_frauds to pos properties
Summary: Property connected_frauds added and set to zero for strata scenario.

Reviewers: mtomic

Reviewed By: mtomic

Differential Revision: https://phabricator.memgraph.io/D1275
2018-03-06 11:02:09 +01:00
florijan
23efdf27d0 Optimize card_fraud_generate_snapshot
Summary:
Reduce memory usage and execution time in card fraud snapshot
generation.

Reviewers: mculinovic

Reviewed By: mculinovic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1270
2018-03-05 16:36:00 +01:00
Teon Banek
9c95d4c381 Allow replacing Accumulate with Synchronize in all cases
Summary:
This fixes a bug where the planning would raise NotYetImplemented error,
due to preventing plan splitting while the operator is already on
master. For example, `MATCH (a), (b) CREATE (a)-[e:r]->(b) RETURN e`
would split the plan after Cartesian and before Create. Thus, the rest
of the plan would be on master, including the Accumulate before Produce.
We still can (and must) replace Accumulate with Synchronize but this
would fail due to unneeded check.

Reviewers: florijan, msantl

Reviewed By: msantl

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1272
2018-03-05 15:35:36 +01:00
florijan
43c0e91057 Enable transaction killer on worker
Summary:
I have not thoroughly thought this through, especially the worker
destruction (is it legit to abort all running tx?), but it's tested to
abort during remote pull, what we need.

Also I improved error handling for vertex deletion failure during
remote pull (@dgleich).

Reviewers: teon.banek, msantl, dgleich

Reviewed By: dgleich

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1263
2018-03-05 12:45:42 +01:00
Matej Ferencevic
41f3b75709 Remove stats to mitigate lock contention
Reviewers: mtomic

Reviewed By: mtomic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1271
2018-03-05 11:53:51 +01:00
Matej Ferencevic
36eed4743a Improve RPC client error messages
Reviewers: mtomic

Reviewed By: mtomic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1268
2018-03-05 10:42:46 +01:00
Matej Ferencevic
f3da6a7bf3 Fix socket file descriptor leaks
Reviewers: mtomic

Reviewed By: mtomic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1267
2018-03-05 10:41:55 +01:00
Marin Tomic
d673d692cb Add error message to AvailableMem
Summary:
test:

```
#include <iostream>
#include "utils/sysinfo/memory.hpp"

#include <sys/resource.h>

int main(void) {
  rlimit lim;
  lim.rlim_cur = 0;
  lim.rlim_max = 0;
  setrlimit(RLIMIT_NOFILE, &lim);
  std::cout << utils::AvailableMem();
  return 0;
}
```

Prints out:
```
E0303 15:08:53.314087 17511] Failed to read amount of available memory from /proc/meminfo
```

Reviewers: mferencevic

Reviewed By: mferencevic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1269
2018-03-05 10:18:16 +01:00
Marko Culinovic
a997d7a15b Modify kill and clean operations
Summary:
Clean operations are executed in parallel, kill command now
kills memgraph on all machines explicitly.

Reviewers: mtomic

Reviewed By: mtomic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1259
2018-03-05 10:00:43 +01:00
Matija Santl
418db646c1 Abort from remote pulls if db says so
Summary:
If the `db` says we need to abort we should abort. There are two
places (in both `PullRemote` and `PullRemoteOrderBy`) where the check is made.
The first one is on the very beginning of the `Pull` method and the second one
is in the loop that checks/waits for remote results.

Reviewers: teon.banek, florijan

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1265
2018-03-02 14:23:02 +01:00
Dominik Gleich
d5b9a11e87 DetachRemoveVertex remote
Reviewers: florijan

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1264
2018-03-02 10:51:26 +01:00
Matija Santl
1ca98826af Use the same ClientPools in distributed
Summary:
Instead of passing `coordination`, pass `rpc_worker_clients` that
holds a map of worker_id->clientPool. By having only one instance of
`RpcWorkerClients` that is owned by `GraphDB` and passing it by refference
we'll share the same client pools for rpc clients.

Reviewers: teon.banek, florijan, dgleich, mferencevic

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1261
2018-03-01 17:14:59 +01:00
Teon Banek
f963c54f77 Use 10us sleep while waiting on RPC
Summary:
Usually a single RPC call takes 50us, which is a lot lower than our
millisecond sleep. Calling sleep with less than a ms duration may not
be really supported (due to timer granularity), but this change should
cause some sub-ms sleep.

Reviewers: florijan, msantl, mferencevic

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1258
2018-03-01 14:50:36 +01:00
Matej Ferencevic
5839dbc401 Fix distributed tests
Reviewers: mtomic

Reviewed By: mtomic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1262
2018-03-01 13:19:18 +01:00
florijan
75c6a57ec2 Comment detach delete logic
Reviewers: dgleich

Reviewed By: dgleich

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1260
2018-03-01 10:38:07 +01:00
Teon Banek
b7f77d40ad Stack allocate the RPC Request
Summary:
There's no need to heap allocate the request which is used only to be
serialized and sent over the network. Unfortunately, this change
complicates the reading a bit, because we need to deserialize the raw
pointer and put it in std::unique_ptr instead of simply deserializing
the unique_ptr.

Heap allocation shows up visibly in perf during benchmarks, so this
change may yield some improvement.

Reviewers: mferencevic, mtomic

Reviewed By: mferencevic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1254
2018-02-28 16:22:45 +01:00
florijan
e61bb8ab1e Support distributed edge removal
Reviewers: dgleich

Reviewed By: dgleich

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1256
2018-02-28 14:35:40 +01:00
Matej Ferencevic
1c1da67745 Fix master build
Reviewers: mtomic, buda

Reviewed By: mtomic

Differential Revision: https://phabricator.memgraph.io/D1255
2018-02-28 12:23:53 +01:00
Dominik Gleich
4c8f924965 Optimize locks
Summary: Speedup findsetnewold

Reviewers: florijan, buda, teon.banek

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1252
2018-02-28 11:36:03 +01:00
Dominik Gleich
99375a4b47 Vertex removal using rpcs
Summary:
Remove vertex remote

Add tests

Reviewers: florijan, teon.banek

Reviewed By: florijan

Subscribers: teon.banek, pullbot

Differential Revision: https://phabricator.memgraph.io/D1230
2018-02-28 11:35:44 +01:00
Matej Ferencevic
7e945c6667 Integrate distributed card fraud test with Apollo
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1247
2018-02-28 11:09:18 +01:00
Matej Ferencevic
19abd0ce02 Move TED talk examples to another suite in QA
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1249
2018-02-27 19:19:42 +01:00
Marko Culinovic
9af3e99928 Remove log
Reviewers: buda

Reviewed By: buda

Differential Revision: https://phabricator.memgraph.io/D1253
2018-02-27 19:01:18 +01:00
Marko Culinovic
e5f14cdcb6 Add cluster prefix flag to statsd
Summary:
Flag cluster-prefix is added because we want to differentiate
between stats collected on different memgraph clusters.

Reviewers: mtomic, buda

Reviewed By: mtomic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1245
2018-02-27 18:06:00 +01:00
Dominik Gleich
79dc10960e Fix double free
Summary: It was possible for transaction to be double freed because both the AllClear and SingleClear of transactions could delete the pointer

Reviewers: florijan, mferencevic

Reviewed By: mferencevic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1250
2018-02-27 14:31:18 +01:00
Matej Ferencevic
a826f41444 Temporarily disable parallel macro benchmarks
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1248
2018-02-27 11:05:13 +01:00
florijan
bb62f463f8 Refactor distributed transactional cache GC
Summary:
Release of per-transaction data in distributed Memgraph refactored. The
master node no longer releases each time a transaction is done, thus
offloading some work from the engine.

Reviewers: dgleich

Reviewed By: dgleich

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1235
2018-02-27 10:47:58 +01:00
Matej Ferencevic
7b262599e6 Fix Bolt timeout check
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1242
2018-02-26 18:18:01 +01:00
Marko Culinovic
6c68d989e0 Add rpc_num_workers to cluster config in json
Summary:
Memgraph has flag --rpc-num-workers, so support for this
was added to script.

Reviewers: buda, mtomic

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1243
2018-02-26 16:04:13 +01:00
Dominik Gleich
ef6cfc4c0e Refactor state deltas call
Summary:
Add label test

Index gets updated after remote update

Reviewers: florijan

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1246
2018-02-26 15:44:50 +01:00
florijan
c8dc07ad0e Remove tx::Engine::GlobalIsActive
Summary:
Remove a method in tx::Engine whose results can be obtained from commit
log info (also guaranteed to be globally correct in distributed).

Reviewers: dgleich

Reviewed By: dgleich

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1240
2018-02-26 14:01:49 +01:00
florijan
dc21511e6e Fix remote edge create
Summary:
Difficult to test properly as the problem was an implicit conversion of
`gid::Gid` to `mvcc::VersionList<> *`. The only proper way to defend
against this would be to make `gid::Gid` a type.

The `CHECK` added in this diff does not help, but should be there, so...

Reviewers: dgleich

Reviewed By: dgleich

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1244
2018-02-26 14:00:45 +01:00
Teon Banek
f1aece8352 Visit PullRemote's input only if it has any
Reviewers: florijan, msantl

Reviewed By: msantl

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1239
2018-02-26 13:18:10 +01:00
Teon Banek
a44d9a0fac Always plan Synchronize if the plan needs it
Reviewers: florijan, msantl

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1241
2018-02-26 13:16:08 +01:00
Marko Budiselic
7a39693ad9 Disable ltalloc by default
Summary: It seems that boost serialize doesn't work well with ltalloc.

Reviewers: mferencevic, dgleich, teon.banek

Reviewed By: mferencevic, dgleich

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1233
2018-02-26 12:23:28 +01:00
Teon Banek
30d2cfb9db Plan PullRemoteOrderBy
Summary:
During distributed execution, OrderBy is split across workers and the
master gets to merge those results via PullRemoteOrderBy. Since this
operator may be an input to almost any other operator, virtual accessors
to `input` have been added in LogicalOperator.

Depends on D1221

Reviewers: florijan, msantl, buda

Reviewed By: msantl

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1232
2018-02-26 11:15:46 +01:00
Matej Ferencevic
2a68543f3e Change Apollo slave groups
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1238
2018-02-25 23:02:31 +01:00
Matija Santl
b9d61a0127 Implement distributed aware OrderBy operator
Summary:
Extracted `TypedValueVectorCompare` and `RemotePuller` from operators
so it can be reused.
The new `PullRemoteOrerBy` operator pulls one result from each worker and one
from master, relies on the fact that workers/master returned sorted results,
returns the next one in order, and pulls the source of that result to get the
next one.

Depends on D1215 that (at the moment) is still in review.

Reviewers: florijan, teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1221
2018-02-23 17:44:21 +01:00
florijan
cbc9420c17 Support distributed query::plan::CreateExpand
Summary:
- The expansion vertex gets created on the origin's worker
- The edge automatically gets created wherever necessary
- Vertex creation logic reuse
- End to end test

Reviewers: teon.banek, msantl

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1227
2018-02-23 17:34:01 +01:00
florijan
c83078e7d9 Suppress logging in tests/manual
Reviewers: teon.banek

Reviewed By: teon.banek

Differential Revision: https://phabricator.memgraph.io/D1237
2018-02-23 16:36:49 +01:00
Marko Culinovic
31fe4541c2 Make actions execution multithreaded
Summary:
Apart from multithreaded executions, actions for running
single-node memgraph and tcpdump are added.

Reviewers: mferencevic, mtomic, buda

Reviewed By: mtomic, buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1205
2018-02-23 16:08:14 +01:00
Matej Ferencevic
d99724647a Add thread names
Summary:
To see the thread names in htop press <F2> to enter setup and under
'Display options' choose 'Show custom thread names'.

Reviewers: buda, teon.banek, florijan

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1234
2018-02-23 16:04:49 +01:00