Conversation
5b5f330 to
c35b95b
Compare
|
I'm not quite following the purpose of the object-locator-key, and not sure why it was initially missing during the design of onode key for Crimson (is it intentional or not). From https://tracker.ceph.com/projects/ceph/wiki/Rados_namespaces, is it an optional abstraction layer between namespace and oid? Should Crimson support it as well? |
RADOS maps objects to pgs by the objects' locator keys, by default, the key is empty and the object name is treated as the key. |
It seems to me that we can replace/reuse the oid field by the locator key if the locator is valid, and store the oid in the onode value in that case. So there is no need to add another string field in the onode key? |
Yeah, will change it. |
c35b95b to
6eb0778
Compare
|
@cyx1231st Please take a look again, thanks:-) |
| } | ||
| string_view_masked_t key_masked() const { | ||
| // TODO(cross-node string dedup) | ||
| return oid_masked(); |
There was a problem hiding this comment.
It doesn't seem that we need both key() and oid() here, and the same to some other places around the onode index changes.
IIUC with this PR, the oid field of the onode tree index is replaced by the concept of effective_key of hobject_t, and there is no need to distingush key and oid from onode indexing perspective.
And if that can be aligned, how about splitting out the renaming efforts (oid -> effective_key) as a separate commit?
There was a problem hiding this comment.
But in the onode deltas, I think we need to remenber both oid and key, which is why I kept the oid() method
There was a problem hiding this comment.
But in the onode deltas, I think we need to remenber both oid and key
Can you elaborate more about why need to remember both?
| gen_t gen; | ||
| ceph::decode(gen, delta); | ||
| return key_hobj_t(ghobject_t( | ||
| shard_id_t(shard), pool, crush, nspace, oid, snap, gen)); |
There was a problem hiding this comment.
It should be fine to adjust the constructor of ghobject_t directly. IIUC it is the only user of the specific constructor.
| onode->create_default_layout(trans, hoid.hobj.oid.name); | ||
| } else { | ||
| onode->create_default_layout(trans, key); | ||
| } |
There was a problem hiding this comment.
Is it correct that the onode value needs to store the oid only if the locator is valid (!key.empty()), otherwise, there is no need to store or even reserve the value space?
There was a problem hiding this comment.
Is it correct that the onode value needs to store the oid only if the locator is valid (!key.empty()), otherwise, there is no need to store or even reserve the value space?
Yes, but I think the size of onode_layout_t has to be a constant value, is this right?
There was a problem hiding this comment.
I suppose the reason why we were not aware of the issue is because that it's rare key.empty() is false, so we mostly don't need the space to store the oid in the value.
Yes, but I think the size of onode_layout_t has to be a constant value, is this right?
I think we might be able to store it in xattr omap with a special internal-only label. So oid becomes really optional. What do you think?
There was a problem hiding this comment.
I think we might be able to store it in
xattromap with a special internal-only label. So oid becomes really optional. What do you think?
I think we need a way to determine whether the "oid" field in the key is actually the oid or locator key, at least when listing objects, so that we can reconstruct the ghobject_t correctly. If we put oid in xattr, we'll need to search the omap tree for each of the objects that are listed. This seems to be a potential performance issue.
|
From @athanatos's feedback, there is no user of the locator field, probably we should:
Quoted:
|
Yeah, will do. |
6eb0778 to
0f71bf1
Compare
|
@cyx1231st Done, please take a look again, thanks. |
| // TODO: gate the crosscore sending | ||
| return get_foreign_connection().send_with_throttling(std::move(reply)); | ||
| } | ||
|
|
There was a problem hiding this comment.
No, reply_op_error() returns deduced type, so it has to be defined before used. So I moved its definition before with_pg_int()
There was a problem hiding this comment.
nit: I think that returning seastar::future<> is more readable and avoids the issue you encountered.
0f71bf1 to
6be84df
Compare
|
jenkins test make check |
2c1975e to
776c2b3
Compare
|
jenkins test make check |
jenkins test make check |
|
jenkins test make check |
|
@Matan-B I think the issue should have been fixed, please test it again, thanks:-) |
https://shaman.ceph.com/builds/ceph/wip-matanb-crimson-testing-april-17 |
Matan-B
left a comment
There was a problem hiding this comment.
2024-04-21T08:04:59.490 INFO:tasks.workunit.client.0.smithi186.stdout:=================================== FAILURES ===================================
2024-04-21T08:04:59.490 INFO:tasks.workunit.client.0.smithi186.stdout:____________________________ TestIoctx.test_locator ____________________________
Seems that the test branch lacks this PR's commit b3754ac |
|
jenkins test make check |
I think that it's there, please see: |
I don't quite understand, but, looking at the error log above, the code doesn't have the change of commit b3754ac |
From the log: The sha1 is represents this branch: https://github.com/ceph/ceph-ci/commits/wip-matanb-crimson-only-testing-april-17/ |
I know, but the code observed (shown below) in the log is wrong, maybe later commits overwrote this part of the code: |
Found the issue, I was testing against main and I should have tested against the PR as a suite. Retesting. |
Fixes: https://tracker.ceph.com/issues/64782
Signed-off-by: Xuehan Xu xuxuehan@qianxin.com
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windowsjenkins test rook e2e