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
This commit is contained in:
parent
f1aece8352
commit
dc21511e6e
@ -185,7 +185,7 @@ class RemoteUpdatesRpcServer {
|
||||
if (creation_result.result == RemoteUpdateResult::DONE &&
|
||||
data.to.worker_id() == db_.WorkerId()) {
|
||||
auto to_delta = database::StateDelta::AddInEdge(
|
||||
data.tx_id, data.to.gid(), data.from,
|
||||
data.tx_id, data.to.gid(), {data.from, db_.WorkerId()},
|
||||
{creation_result.gid, db_.WorkerId()}, data.edge_type);
|
||||
creation_result.result =
|
||||
GetUpdates(vertex_updates_, data.tx_id).Emplace(to_delta);
|
||||
|
@ -173,6 +173,8 @@ class DistributedEdgeCreateTest : public DistributedGraphDbTest {
|
||||
|
||||
void CreateEdge(database::GraphDb &creator, storage::VertexAddress from_addr,
|
||||
storage::VertexAddress to_addr) {
|
||||
CHECK(from_addr.is_remote() && to_addr.is_remote())
|
||||
<< "Local address given to CreateEdge";
|
||||
database::GraphDbAccessor dba{creator};
|
||||
auto edge_type = dba.EdgeType("et");
|
||||
VertexAccessor v1{from_addr, dba};
|
||||
|
Loading…
Reference in New Issue
Block a user