Adds support to the find_garbage command to restrict itself to a partial tenant ID prefix, say a, and then it only traverses tenants with IDs starting with a. One can now pass the --tenant-id-prefix parameter.
That way, one can shard the find_garbage command and make it run in parallel.
The PR also does a change of how remote_storage first removes trailing /s, only to then add them in the listing function. It turns out that this isn't neccessary and it prevents the prefix functionality from working. S3 doesn't do this either.
Adds support to the
find_garbage
command to restrict itself to a partial tenant ID prefix, saya
, and then it only traverses tenants with IDs starting witha
. One can now pass the--tenant-id-prefix
parameter.That way, one can shard the
find_garbage
command and make it run in parallel.The PR also does a change of how
remote_storage
first removes trailing/
s, only to then add them in the listing function. It turns out that this isn't neccessary and it prevents the prefix functionality from working. S3 doesn't do this either.