Files
memgraph/src/distributed/durability_rpc_server.cpp
Dominik Gleich b20e31e800 Synchronize snapshooting
Summary: Make synchronized snapshot. This invokese the snapshooter on workers on the master snapshot scheduler interval.

Reviewers: msantl, mtomic

Reviewed By: msantl

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1334
2018-04-06 10:10:01 +02:00

19 lines
627 B
C++

#include "distributed/durability_rpc_server.hpp"
#include "database/graph_db.hpp"
#include "database/graph_db_accessor.hpp"
#include "distributed/durability_rpc_messages.hpp"
namespace distributed {
DurabilityRpcServer::DurabilityRpcServer(database::GraphDb &db,
communication::rpc::Server &server)
: db_(db), rpc_server_(server) {
rpc_server_.Register<MakeSnapshotRpc>([this](const MakeSnapshotReq &req) {
database::GraphDbAccessor dba(this->db_, req.member);
return std::make_unique<MakeSnapshotRes>(this->db_.MakeSnapshot(dba));
});
}
} // namespace distributed