mirror of
https://github.com/ceph/ceph
synced 2026-08-02 07:03:18 +00:00
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:
commit
5a3b87ac6f
@ -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);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user