Skip to content
This repository has been archived by the owner on Oct 18, 2021. It is now read-only.

bugfix: Reverse edge has wrong partitionId #164

Merged
merged 2 commits into from
Oct 18, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ class EdgeProcessor(data: DataFrame,
hostAddrs.append(new HostAddress(addr.getHostText, addr.getPort))
}

val partitionId = NebulaUtils.getPartitionId(srcId, partitionNum, vidType)
val srcPartitionId = NebulaUtils.getPartitionId(srcId, partitionNum, vidType)
val dstPartitionId = NebulaUtils.getPartitionId(dstId, partitionNum, vidType)
val codec = new NebulaCodecImpl()

import java.nio.ByteBuffer
Expand All @@ -199,13 +200,13 @@ class EdgeProcessor(data: DataFrame,
dstId.getBytes()
}
val positiveEdgeKey = codec.edgeKeyByDefaultVer(spaceVidLen,
partitionId,
srcPartitionId,
srcBytes,
edgeItem.getEdge_type,
ranking,
dstBytes)
val reverseEdgeKey = codec.edgeKeyByDefaultVer(spaceVidLen,
partitionId,
dstPartitionId,
dstBytes,
-edgeItem.getEdge_type,
ranking,
Expand Down