mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-11-29 05:49:03 +08:00
Merge pull request #533 from xxr3376/patch-1
Fix panic error when target collection is not exist.
This commit is contained in:
commit
0909f669a0
@ -116,6 +116,9 @@ func (t *Topology) GetVolumeLayout(collectionName string, rp *storage.ReplicaPla
|
||||
|
||||
func (t *Topology) FindCollection(collectionName string) (*Collection, bool) {
|
||||
c, hasCollection := t.collectionMap.Find(collectionName)
|
||||
if !hasCollection {
|
||||
return nil, false
|
||||
}
|
||||
return c.(*Collection), hasCollection
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user