Repository navigation
osd: refcount for manifest object (redirect, chunked) - #19935
Conversation
d5e5e56 to
6a36122
Compare
e18f958 to
6be622a
Compare
|
@liewegas In the previous discussion (#15482), we has discussed the following a issue.
This PR shows the concept of refcount for manifest object.
The target object which is referenced by other objects will be deleted if its refcount is 0. Can you take a look? Please let me know if I missed something. |
There was a problem hiding this comment.
it doesn't seem like retired_refs is serving any purpose?
There was a problem hiding this comment.
This is my mistake. I will fix this.
There was a problem hiding this comment.
i would drop this type and just use hobject_t. i don't think we need to know which part of the referring object is pointing at this chunk, and we're missing the hash value here, which would be useful for a space-efficient coarse-grained ref map.
There was a problem hiding this comment.
do we really want to set ref counts for a vanilla redirect?
There was a problem hiding this comment.
I think this has to happen in a context after the local operation commits. otherwise we might crash, failing to commit locally, but still decrement the ref on the chunk.
There was a problem hiding this comment.
Right. I will fix this as your comment.
There was a problem hiding this comment.
It seems like this shouldn't be based on need_reference but instead on just (oi.flags & object_info_t::FLAG_REDIRECT_HAS_REFERENCE)
|
@liewegas We need to discuss two issues.
|
|
I think we might have a more general question to answer: how/when do we know from a given object_info_t manifest that we own references to the target object that we need to increment/decrement. I see a few options:
I lean toward 2... |
|
Note that hobject_t includes the pool id: https://github.com/ceph/ceph/blob/master/src/common/hobject.h#L49 |
|
@liewegas I think there are two types of flag.
|
|
I think just hobject_t is sufficient |
184d6bd to
2c6011c
Compare
|
@liewegas I reworked existing commits as your comments. please review it again. |
There was a problem hiding this comment.
s/string method/bool get/ so we can avoid a string comparison here
There was a problem hiding this comment.
Hmm, I don't think we should interfere with delete here. If someone goes and sends delete ops to a rados pool with refcounted objects that's their mistake.
If we're worried about it, perhaps a pool property that disallows delete ops, or caps that only allow read operations and the refcount cls.
b372439 to
a5517af
Compare
|
@liewegas I reworked this PR based on your recent comments. Any other comments? |
|
(Also, needs rebase!) |
f1a0b9b to
2b0f376
Compare
|
@liewegas Your suggestion is make sense to me. I address all your comments. Please review again. |
|
@liewegas Ping. |
2b0f376 to
1f6697e
Compare
|
Rebase is done (I just resolved a conflict). |
|
hmm looks like there's a new conflict? that test result shoudl be fine! |
64248c0 to
1f6697e
Compare
refcount() for chunked object is added (based on source id, pool id and offset) Signed-off-by: Myoungwon Oh <[email protected]>
Signed-off-by: Myoungwon Oh <[email protected]>
Signed-off-by: Myoungwon Oh <[email protected]>
Signed-off-by: Myoungwon Oh <[email protected]>
Signed-off-by: Myoungwon Oh <[email protected]>
…bject is referenced Signed-off-by: Myoungwon Oh <[email protected]>
Signed-off-by: Myoungwon Oh <[email protected]>
Signed-off-by: Myoungwon Oh <[email protected]>
1f6697e to
5d67bb9
Compare
|
@liewegas A conflict is resolved. |
This PR introduces refcount operations for redirect and chunked object.
(please refer to #19294, #15482)
Signed-off-by: Myoungwon Oh [email protected]