memgraph/src/transactions
Matija Santl 5e6cf0724a Implement StateDelta apply method for Raft
Summary:
TransactionReplicator replicates transactions on follower machines in
HA memgraph. Our DB accessor API doesn't provide us with the functionality to
begin transactions with non-increasing ids. This is why the
`TransactionReplicator` uses a internal map that maps tx ids from the leader
node to transactions on the follower node (whose id doesn't have to match the
leaders tx id).

If the leader has the following transaction timeline:

```
    L
tx1
 |
 |   tx2
 |    |
 |    |
 |    |
 |    |
 |    |
 |   tx2
 |
 |
 |
 |
tx1
```

`tx2` will commit first and will be replicated. When applying `tx2` on follower
nodes, they will start a new transaction with tx id `1`.  When `tx1` starts
replicating, followers will start a new transaction with tx id `2`. And this is
wehre `TransactionReplicator` kicks in.

Reviewers: ipaljak

Reviewed By: ipaljak

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1775
2018-12-14 14:26:40 +01:00
..
distributed Serialize RPC messages using SLK 2018-12-14 14:24:39 +01:00
single_node Add blocking transactions for index creation 2018-10-24 16:31:50 +02:00
single_node_ha Implement StateDelta apply method for Raft 2018-12-14 14:26:40 +01:00
commit_log.hpp Move distributed transaction engine logic 2018-09-07 11:43:57 +02:00
engine.hpp Prepare codebase for high availability 2018-10-30 10:58:50 +01:00
lock_store.hpp Refactor storage file structure 2018-11-06 18:17:31 +01:00
snapshot.hpp Wire raft into memgraph pt.1. 2018-12-10 17:08:36 +01:00
transaction.hpp Refactor storage file structure 2018-11-06 18:17:31 +01:00
type.hpp Move distributed transaction engine logic 2018-09-07 11:43:57 +02:00