From 715b199eeb6fbd3f028b99e42097096fdcac5e09 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 13 Dec 2020 04:14:50 -0800 Subject: [PATCH] fix tests --- weed/topology/topology.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/weed/topology/topology.go b/weed/topology/topology.go index 62332f805..f5d335be5 100644 --- a/weed/topology/topology.go +++ b/weed/topology/topology.go @@ -182,6 +182,9 @@ func (t *Topology) DeleteLayout(collectionName string, rp *super_block.ReplicaPl return } collection.DeleteVolumeLayout(rp, ttl, volumeType) + if len(collection.storageType2VolumeLayout.Items()) == 0 { + t.DeleteCollection(collectionName) + } } func (t *Topology) RegisterVolumeLayout(v storage.VolumeInfo, dn *DataNode) {