New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rgw: add pool namespace to cache's key so that system obj can have unique key #14125

Merged
merged 1 commit into from Apr 4, 2017

Conversation

Projects
None yet
3 participants
@zhangsw
Contributor

zhangsw commented Mar 24, 2017

@yehudasa

This comment has been minimized.

Member

yehudasa commented Mar 28, 2017

@zhangsw oh, I see, it's a post kraken issue, related to the new support for pool namespaces. Maybe should modify bug description and the commit message to better convey the actual bug, rather than the symptom?

rgw: add pool namespace to cache's key so that system obj can have un…
…ique

key name.

Fixes: http://tracker.ceph.com/issues/19372

Signed-off-by: Zhang Shaowen <zhangshaowen@cmss.chinamobile.com>

@zhangsw zhangsw changed the title from rgw: user who has same uid and access key can't work as expected. to rgw: add pool ns to cache's key to ensure that system obj has an unique key. Mar 29, 2017

@zhangsw zhangsw changed the title from rgw: add pool ns to cache's key to ensure that system obj has an unique key. to rgw: add pool namespace to cache's key so that system obj can have unique key name Mar 29, 2017

@zhangsw zhangsw changed the title from rgw: add pool namespace to cache's key so that system obj can have unique key name to rgw: add pool namespace to cache's key so that system obj can have unique key Mar 29, 2017

@zhangsw

This comment has been minimized.

Contributor

zhangsw commented Mar 29, 2017

@yehudasa I've updated it.

@cbodley

This comment has been minimized.

@cbodley

cbodley approved these changes Apr 4, 2017

buf.reserve(pool.name.size() + oid.size() + 2);
buf.append(pool.name).append("+").append(oid);
buf.reserve(pool.name.size() + pool.ns.size() + oid.size() + 2);
buf.append(pool.name).append("+").append(pool.ns).append("+").append(oid);

This comment has been minimized.

@cbodley

cbodley Apr 4, 2017

Contributor

just a note that, although this adds an extra "+" to the string without accounting for it in the math for buf.reserve(), the result is still correct because buf.reserve() already accounts for the null terminator

@cbodley cbodley merged commit 484e1a3 into ceph:master Apr 4, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details

@zhangsw zhangsw deleted the zhangsw:fix-rgw-cache-normalname-bug branch Apr 5, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment