Skip to content
Merged
Show file tree
Hide file tree
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 @@ -275,6 +275,7 @@ public void reset() {
groups = new ConcurrentHashMap<>();
stores = new ConcurrentHashMap<>();
caches = new ConcurrentHashMap<>();
initialized.set(false);
}

public Shard getLeader(int partitionId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,9 @@ private KVPair<Metapb.Partition, Metapb.Shard> getKvPair(String graphName, byte[
*/
public KVPair<Metapb.Partition, Metapb.Shard> getPartition(String graphName, byte[] key) throws
PDException {
KVPair<Metapb.Partition, Metapb.Shard> partShard = cache.getPartitionByKey(graphName, key);

KVPair<Metapb.Partition, Metapb.Shard> partShard =
this.getPartitionByCode(graphName, PartitionUtils.calcHashcode(key));
partShard = getKvPair(graphName, key, partShard);
return partShard;
}
Expand Down