aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-05-07 03:11:26 -0700
committerChris Lu <chris.lu@gmail.com>2020-05-07 03:11:26 -0700
commit73087f59b1fd0cee675344a58445453744ff3d41 (patch)
treedadb2f0434c0a457e1b5abc1ea16b8dd826dd02f
parent0952eb28543d249fc63a1747db5d82e8a52bab38 (diff)
downloadseaweedfs-73087f59b1fd0cee675344a58445453744ff3d41.tar.xz
seaweedfs-73087f59b1fd0cee675344a58445453744ff3d41.zip
filer store: mongodb deleting children
fix https://github.com/chrislusf/seaweedfs/issues/1303
-rw-r--r--weed/filer2/mongodb/mongodb_store.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/filer2/mongodb/mongodb_store.go b/weed/filer2/mongodb/mongodb_store.go
index 63a7a43e4..375a457a4 100644
--- a/weed/filer2/mongodb/mongodb_store.go
+++ b/weed/filer2/mongodb/mongodb_store.go
@@ -159,7 +159,7 @@ func (store *MongodbStore) DeleteEntry(ctx context.Context, fullpath util.FullPa
func (store *MongodbStore) DeleteFolderChildren(ctx context.Context, fullpath util.FullPath) error {
where := bson.M{"directory": fullpath}
- _, err := store.connect.Database(store.database).Collection(store.collectionName).DeleteOne(ctx, where)
+ _, err := store.connect.Database(store.database).Collection(store.collectionName).DeleteMany(ctx, where)
if err != nil {
return fmt.Errorf("delete %s : %v", fullpath, err)
}