On Tue, 4 Jun 2024 14:29:23 -0300 Thiago De Moraes Teixeira <teixeira.thiago@luizalabs.com> wrote:
First, when deleting the account, account-reaper lists objects from the sharded bucket, an empty list is returned from *direct_get_container* function, so the reaper interprets it as an empty bucket, and the delete fails with a 409 Conflict because objects exist inside the bucket.
That looks like a bug. I'm astonished that nobody has encountered it yet, but users of direct_get_container must check for retuned shards. There's some sample code in the object watcher, https://opendev.org/openstack/swift/src/branch/master/swift/obj/watchers/dar...
... But in this case, when the reaper tries to delete objects inside this account, all objects are not found because the object path used is "/.shards_AUTH_<project_id>/<bucket>-<hash>- <timestamp>-<shard_index>/<key>" instead of "/AUTH_<project_id>/ <bucket>/<key>".
Not sure what to say about that. Either way, I think the best course of action is to file a bug in Launchpad. This may need some not entirely trivial work. -- Pete