Repository navigation
rgw/dedup: Add support for RGW versions. - #66233
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for RGW object versioning in the dedup process by tracking object instances and updating the dedup logic to handle versioned objects correctly.
Key Changes:
- Added
instancefield todisk_record_tstructure to track object versions - Refactored
get_ioctx()to usergw_obj_index_keyfor proper version-aware object identification - Improved duplicate detection logic to use
ref_tagcomparison instead of object name/bucket comparison
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/rgw/driver/rados/rgw_dedup_store.h | Added instance field to disk_record_t structure and removed unused object_version field |
| src/rgw/driver/rados/rgw_dedup_store.cc | Updated constructor, serialization, and deserialization to handle instance field |
| src/rgw/driver/rados/rgw_dedup.h | Updated function signature to accept instance parameter |
| src/rgw/driver/rados/rgw_dedup.cc | Propagated instance parameter through call chain, refactored get_ioctx to use rgw_obj_index_key, improved duplicate detection and marker handling |
| src/rgw/driver/rados/rgw_dedup_cluster.h | Fixed buffer overflow in snprintf call |
| src/rgw/driver/rados/rgw_dedup_utils.h | Removed unused build_oid helper function |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 9 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
|
|
||
| unique_ptr<rgw::sal::Object> p_obj = bucket->get_object(p_rec->obj_name); | ||
| const rgw_obj_index_key roi_key(p_rec->obj_name, p_rec->instance); |
| assert result[1] == 0 ,"Files %s and %s differ!!" % (key, tempfile) | ||
| os.remove(tempfile) | ||
|
|
||
| equal = filecmp.cmp(tmpfile, OUT_DIR + src_filename, shallow=False) |
|
looks good , and passed the test. |
|
Another run of the dedup tests with clean results |
|
jenkins test make check arm64 |
1 similar comment
|
jenkins test make check arm64 |
Dedup code will scan all instances of versioned objects and include them in the dedup process Signed-off-by: Gabriel BenHanokh <[email protected]>
Signed-off-by: Gabriel BenHanokh <[email protected]>
Dedup code will scan all instances of versioned objects and include them in the dedup process
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.