mirror of
https://github.com/talent-plan/tinykv.git
synced 2026-08-22 14:33:28 +08:00
MustHavePeer and MustNonePeer should panic after timeout (#207)
This commit is contained in:
@@ -445,6 +445,7 @@ func (c *Cluster) MustHavePeer(regionID uint64, peer *metapb.Peer) {
|
||||
}
|
||||
SleepMS(10)
|
||||
}
|
||||
panic(fmt.Sprintf("no peer: %v", peer))
|
||||
}
|
||||
|
||||
func (c *Cluster) MustNonePeer(regionID uint64, peer *metapb.Peer) {
|
||||
@@ -464,4 +465,5 @@ func (c *Cluster) MustNonePeer(regionID uint64, peer *metapb.Peer) {
|
||||
}
|
||||
SleepMS(10)
|
||||
}
|
||||
panic(fmt.Sprintf("have peer: %v", peer))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user