Merge pull request #69373 from mheler/wip-rgw-restore-queue-shard-fix

rgw/restore: run shard hash through HASH_PRIME

Reviewed-by: Soumya Koduri <skoduri@redhat.com>
This commit is contained in:
Soumya Koduri 2026-06-19 16:27:00 +05:30 committed by GitHub
commit 5a3b87ac6f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -266,7 +266,7 @@ std::ostream& Restore::gen_prefix(std::ostream& out) const
int Restore::choose_oid(const RestoreEntry& e) {
int index;
const auto& name = e.bucket.name + e.obj_key.name + e.obj_key.instance;
index = ((ceph_str_hash_linux(name.data(), name.size())) % max_objs);
index = ((ceph_str_hash_linux(name.data(), name.size())) % HASH_PRIME % max_objs);
return static_cast<int>(index);
}