diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-05-07 03:11:26 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-05-07 03:11:26 -0700 |
| commit | 73087f59b1fd0cee675344a58445453744ff3d41 (patch) | |
| tree | dadb2f0434c0a457e1b5abc1ea16b8dd826dd02f | |
| parent | 0952eb28543d249fc63a1747db5d82e8a52bab38 (diff) | |
| download | seaweedfs-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.go | 2 |
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) } |
