threefoldtecharchive / minio

Minio with 0-stor backend
Apache License 2.0
0 stars 0 forks source link

Inconsistent bucket delete operation #30

Closed Hamdy closed 5 years ago

Hamdy commented 6 years ago

Deleting a bucket containing objects then creating a new bucket with same name is not working as expected!

Expected Behavior

Newly created one must be empty

Current Behavior

I get back old objects in the deleted bucket in my newly created bucket

Possible Solution

Actually deleting files, or mark them as deleted so they can be hidden or may be when creating a bucket, it should have unique ID associated with it, we use that ID as prefix for objects internally. and we also may have a table containing these mappings to do resolution then when deleting a bucket, and creating a new one it gets a new ID which is different than the old one so old objects are no more associated to newly created bucket

Steps to Reproduce (for bugs)

  1. Create bucket (buck1)
  2. Upload some objects
  3. Delete buck1
  4. Create new bucket buck1

Context

Your Environment

despiegk commented 5 years ago

can we reproduce this

muhamadazmy commented 5 years ago

fixed here

https://github.com/threefoldtech/minio/commit/53239f6520f4b34d427d919ea30d0dc444036cda