Repository navigation
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR removes the wildcard reference mechanism from the refcount system, replacing it with explicit source object references. The change affects server-side copy and deduplication operations by requiring both source and target tags to be specified when managing object reference counts.
Key changes:
- Modified
cls_refcount_get()to require asrc_tagparameter instead of animplicit_refboolean flag - Updated
cls_refcount_put()to remove theimplicit_refparameter - Changed
cls_refcount_read()to remove theimplicit_refparameter
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/cls/refcount/cls_refcount.cc | Core refcount logic updated to use src_tag instead of wildcard references |
| src/cls/refcount/cls_refcount_client.h | API signatures changed to add src_tag parameter and remove implicit_ref |
| src/cls/refcount/cls_refcount_client.cc | Client implementation updated with validation for non-empty tags |
| src/cls/refcount/cls_refcount_ops.h | Operation structures modified to replace implicit_ref with src_tag |
| src/cls/refcount/cls_refcount_ops.cc | Encoding/decoding updated for new src_tag field |
| src/rgw/driver/rados/rgw_rados.cc | Server-side copy updated to use actual source tag instead of wildcard |
| src/rgw/driver/rados/rgw_gc.cc | Garbage collection updated to use new put API without implicit_ref |
| src/rgw/driver/rados/rgw_dedup.h | Dedup interface updated to accept both src_tag and tgt_tag |
| src/rgw/driver/rados/rgw_dedup.cc | Dedup implementation updated to pass source and target tags explicitly |
| src/test/cls_refcount/test_cls_refcount.cc | Test suite completely rewritten to test new src_tag functionality |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| @@ -19,15 +19,15 @@ list<cls_refcount_get_op> cls_refcount_get_op::generate_test_instances() | |||
| ls.emplace_back(); | |||
| ls.emplace_back(); | |||
| ls.back().tag = "foo"; | |||
| ls.back().implicit_ref = true; | |||
| // TBD: we can't pass paramters here so there is no way to get the src_tag ??? | |||
There was a problem hiding this comment.
Corrected spelling of 'paramters' to 'parameters'.
| // TBD: we can't pass paramters here so there is no way to get the src_tag ??? | |
| // TBD: we can't pass parameters here so there is no way to get the src_tag ??? |
| return -EINVAL; | ||
| // if refcount was not set on this object it can remove with no further checks | ||
| if (objr.refs.empty()) { | ||
| CLS_LOG(20, "cls_rc_refcount_put() tag=%s was called without any references\n", |
There was a problem hiding this comment.
[nitpick] The log level 20 is inconsistent with the log level 10 used for the entry log at line 111. Consider using log level 10 for consistency, or document why a higher verbosity level is needed for this particular case.
| CLS_LOG(20, "cls_rc_refcount_put() tag=%s was called without any references\n", | |
| CLS_LOG(10, "cls_rc_refcount_put() tag=%s was called without any references\n", |
1a2162b to
f4c3f20
Compare
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…placing it with explicit source object references. The change affects server-side copy and deduplication operations by requiring both source and target tags to be specified when managing object reference counts. Signed-off-by: Gabriel BenHanokh <[email protected]>
f4c3f20 to
7da9e1c
Compare
|
jenkins test make check arm64 |
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 10 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
jenkins test make check arm64 |
1 similar comment
|
jenkins test make check arm64 |
|
jenkins test make check arm64 |
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| void cls_refcount_read_op::dump(ceph::Formatter *f) const | ||
| { | ||
| f->dump_int("implicit_ref", (int)implicit_ref); | ||
| // there are no data members to dump |
There was a problem hiding this comment.
[nitpick] This comment is now accurate but could be more informative. Consider updating to explain why there are no data members (e.g., 'cls_refcount_read_op has no parameters; it reads all references unconditionally').
| // there are no data members to dump | |
| // cls_refcount_read_op has no parameters; it reads all references unconditionally, so there are no data members to dump |
why? what effect does this have on existing objects? |
|
jenkins test make check
The current When we increment the references, we always know the correct reference of the source object, so there is no reason to use a wildcard. Initially, I anticipated this change would be trivial, but it has resulted in nearly 1000 lines of code modification, with the majority being a rewrite of the unit tests. I still need to implement backward compatibility for existing messages, which will further increase the scope of this change. |
thanks @benhanokh. is this an issue specific to dedup, or is there a way for s3 operations accidentally lose tail objects? |
This issue exists today with server-side copy. If some broken code will send cls_refcount_put() request to the SRC-TAIL object it will be removed evenso the SRC-HEAD still exists. |
i understand the risk, but i don't think this has come up since 2017 in https://tracker.ceph.com/issues/20107#note-10
to me, the churn from this would present a greater risk that doesn't feel well-motivated |
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
|
This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution! |
This PR removes the wildcard reference mechanism from the refcount system, replacing it with explicit source object references. The change affects server-side copy and deduplication operations by requiring both source and target tags to be specified when managing object reference counts.
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 test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.