mirror of
https://github.com/talent-plan/tinykv.git
synced 2025-03-15 04:10:42 +08:00
MustHavePeer and MustNonePeer should panic after timeout (#207)
This commit is contained in:
parent
109bf90f4d
commit
3513f5d1b4
@ -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))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user