Skip to content

rgw/dedup: Tech preview of full dedup support which means duplicate objects will be removed - #64271

Merged
adamemerson merged 2 commits into
ceph:mainfrom
benhanokh:full_dedup
Sep 12, 2025
Merged

adamemerson merged 2 commits into
ceph:mainfrom
benhanokh:full_dedup

Conversation

@benhanokh

@benhanokh benhanokh commented Jun 30, 2025 •

Copy link
Copy Markdown
Contributor

Dedup code is limited by default to dry-run reporting estimated dedup-level in the system. This PR adds a full-dedup option which will remove duplicated objects and link copies.
To the run the full dedup code caller needs to add --yes-i-really-mean-it and flag:
"radosgw-admin dedup restart --yes-i-really-mean-it"
It is meant as a tech preview only and not for production systems

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 x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

@benhanokh
benhanokh requested a review from yuvalif June 30, 2025 13:08
@benhanokh benhanokh self-assigned this Jun 30, 2025
@benhanokh
benhanokh requested a review from a team as a code owner June 30, 2025 13:08
@benhanokh benhanokh changed the title rgw/dedup: add full object dedup support which means duplicate objects rgw/dedup: Tech preview of full dedup support which means duplicate objects will be removed Jun 30, 2025
@benhanokh

Copy link
Copy Markdown
Contributor Author

@benhanokh

Copy link
Copy Markdown
Contributor Author

jenkins test windows

@benhanokh

Copy link
Copy Markdown
Contributor Author

jenkins test docs

@benhanokh

Copy link
Copy Markdown
Contributor Author

jenkins test windows

Comment thread src/rgw/radosgw-admin/radosgw-admin.cc Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need this flag?
we already require the yes-i-really-mean-it flag.
also, AFAIK, tech preview is a downstream term. on main everything is a tech preview

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to have this PR backported to tentacle to allow customers to try full dedup on test setup

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i still dont see why we need another flag. especially that it is used a a downstream term ('tentacle" is a stable upstream version)

Comment thread src/rgw/rgw_dedup_store.cc Resolved
Comment thread src/test/rgw/dedup/test_dedup.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how long does this tests takes in teuthology?
same question on test_dedup_large_scale()

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to check the output on teuthology, on my system it takes 5 min

@benhanokh benhanokh Jul 3, 2025 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked the teuthology run -
Dry run tests (which is what we got without this PR) took 22 minutes
Most of the time was spent inside the last 2 tests (test_dedup_dry_large_scale_with_tenants and test_dedup_dry_large_scale) which took 15 minutes together.

The full dedup tests took 38 minutes (we need to read all the objects and calculate blake3 hash)
Out of the 38 minutes we spent 13 minutes inside test_dedup_inc_loop_with_tenants which runs 10 cycles of incremental dedup (so really it is running 10 tests internally).

Together the full dedup suite took a full hour.

Comment thread src/rgw/rgw_dedup_utils.cc Resolved
@benhanokh

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@yuvalif

yuvalif commented Jul 8, 2025

Copy link
Copy Markdown
Contributor

@benhanokh
benhanokh requested a review from a team as a code owner July 22, 2025 17:40
@yuvalif
yuvalif self-requested a review July 23, 2025 07:56
@benhanokh

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@benhanokh

Copy link
Copy Markdown
Contributor Author

jenkins test make check arm64

@benhanokh

Copy link
Copy Markdown
Contributor Author

jenkins test make check arm64

1 similar comment
@benhanokh

Copy link
Copy Markdown
Contributor Author

jenkins test make check arm64

@benhanokh

Copy link
Copy Markdown
Contributor Author

@yuvalif

yuvalif commented Aug 4, 2025

Copy link
Copy Markdown
Contributor

https://pulpito.ceph.com/benhanokh-2025-07-31_10:33:13-rgw-wip_full_dedup_x2-distro-default-smithi/

@ivancich

Copy link
Copy Markdown
Member

@benhanokh and @yuvalif : On the QA run (https://tracker.ceph.com/issues/72685) I see the dedup test failures. Is there another PR to fix the tests are do we need to live with those failures for the near-future?

I also see two errors with test_cls_refcount.sh, which seems like it could be related, and which is concerning, as it could be a data loss bug.

Please look at both of those here:

In addition to adding a comment here as to your analysis, please also add a comment to the tracker linked at the start of this comment. Thanks!

@yuvalif

yuvalif commented Aug 26, 2025

Copy link
Copy Markdown
Contributor

@benhanokh and @yuvalif : On the QA run (https://tracker.ceph.com/issues/72685) I see the dedup test failures. Is there another PR to fix the tests are do we need to live with those failures for the near-future?

I also see two errors with test_cls_refcount.sh, which seems like it could be related, and which is concerning, as it could be a data loss bug.

Please look at both of those here:

In addition to adding a comment here as to your analysis, please also add a comment to the tracker linked at the start of this comment. Thanks!

@ivancich the dedup failures are due to a regression in the GC code (unrelated to dedup) - test are failing because they are testing for proper RADOS objects cleanup. Once the root cause is fixed the deup failures should disappear

regarding the cls_refcount issues, i have no idea, @benhanokh ?

@benhanokh

Copy link
Copy Markdown
Contributor Author

@benhanokh and @yuvalif : On the QA run (https://tracker.ceph.com/issues/72685) I see the dedup test failures. Is there another PR to fix the tests are do we need to live with those failures for the near-future?
I also see two errors with test_cls_refcount.sh, which seems like it could be related, and which is concerning, as it could be a data loss bug.
Please look at both of those here:

In addition to adding a comment here as to your analysis, please also add a comment to the tracker linked at the start of this comment. Thanks!

@ivancich the dedup failures are due to a regression in the GC code (unrelated to dedup) - test are failing because they are testing for proper RADOS objects cleanup. Once the root cause is fixed the deup failures should disappear

regarding the cls_refcount issues, i have no idea, @benhanokh ?

I found a possible ref_count issue in my code (if dedup was executed after server-side-copy) and it was fixed in - #64730 which is waiting for GC issue to be solved before it can be tested

@yuvalif

yuvalif commented Aug 26, 2025 •

Copy link
Copy Markdown
Contributor

@benhanokh can please you split the ref_count issue into its own PR or add it here?
the throttling PR will take more time to merge regardless of the GC problem

@benhanokh

Copy link
Copy Markdown
Contributor Author

@benhanokh can please you split the ref_count issue into its own PR or add it here? the throttling PR will take more time to merge regardless of the GC problem

Dedup is disabled without this PR (64271) so the issue doesn't break anything.
I rather wait for the throttling PR to be merged and solve the problem as pushing a stand alone PR with a few lines will still take me hours of works to push (going over multiple unrelated errors ...)

@yuvalif

yuvalif commented Aug 26, 2025

Copy link
Copy Markdown
Contributor

@benhanokh can please you split the ref_count issue into its own PR or add it here? the throttling PR will take more time to merge regardless of the GC problem

Dedup is disabled without this PR (64271) so the issue doesn't break anything. I rather wait for the throttling PR to be merged and solve the problem as pushing a stand alone PR with a few lines will still take me hours of works to push (going over multiple unrelated errors ...)

it seems like it broke the cls_ref_count unit tests?

@benhanokh

Copy link
Copy Markdown
Contributor Author

@benhanokh can please you split the ref_count issue into its own PR or add it here? the throttling PR will take more time to merge regardless of the GC problem

Dedup is disabled without this PR (64271) so the issue doesn't break anything. I rather wait for the throttling PR to be merged and solve the problem as pushing a stand alone PR with a few lines will still take me hours of works to push (going over multiple unrelated errors ...)

it seems like it broke the cls_ref_count unit tests?

dedup code can not be activated without this PR.
The existing code only runs which doesn't call delete

@yuvalif

yuvalif commented Aug 26, 2025

Copy link
Copy Markdown
Contributor

@benhanokh can please you split the ref_count issue into its own PR or add it here? the throttling PR will take more time to merge regardless of the GC problem

Dedup is disabled without this PR (64271) so the issue doesn't break anything. I rather wait for the throttling PR to be merged and solve the problem as pushing a stand alone PR with a few lines will still take me hours of works to push (going over multiple unrelated errors ...)

it seems like it broke the cls_ref_count unit tests?

dedup code can not be activated without this PR. The existing code only runs which doesn't call delete

  • cls code is independent of RGW - so it is irrelevant if dedup is activated or not
  • if you dont want a separate PR, please add the fix to this one (instead of the throttling one)

@benhanokh

Copy link
Copy Markdown
Contributor Author

@benhanokh can please you split the ref_count issue into its own PR or add it here? the throttling PR will take more time to merge regardless of the GC problem

Dedup is disabled without this PR (64271) so the issue doesn't break anything. I rather wait for the throttling PR to be merged and solve the problem as pushing a stand alone PR with a few lines will still take me hours of works to push (going over multiple unrelated errors ...)

it seems like it broke the cls_ref_count unit tests?

dedup code can not be activated without this PR. The existing code only runs which doesn't call delete

  • cls code is independent of RGW - so it is irrelevant if dedup is activated or not
  • if you dont want a separate PR, please add the fix to this one (instead of the throttling one)

dedup code doesn't change ref_count cls.
The problem was the dedup exec was removing duplicated tail-objects using librados.remove() instead of sending a CLS to decrement the ref-count

@yuvalif

yuvalif commented Aug 26, 2025

Copy link
Copy Markdown
Contributor

@benhanokh can please you split the ref_count issue into its own PR or add it here? the throttling PR will take more time to merge regardless of the GC problem

Dedup is disabled without this PR (64271) so the issue doesn't break anything. I rather wait for the throttling PR to be merged and solve the problem as pushing a stand alone PR with a few lines will still take me hours of works to push (going over multiple unrelated errors ...)

it seems like it broke the cls_ref_count unit tests?

dedup code can not be activated without this PR. The existing code only runs which doesn't call delete

  • cls code is independent of RGW - so it is irrelevant if dedup is activated or not
  • if you dont want a separate PR, please add the fix to this one (instead of the throttling one)

dedup code doesn't change ref_count cls. The problem was the dedup exec was removing duplicated tail-objects using librados.remove() instead of sending a CLS to decrement the ref-count

so, this mean that the above failure is unrelated to this PR?

@benhanokh

Copy link
Copy Markdown
Contributor Author

@benhanokh can please you split the ref_count issue into its own PR or add it here? the throttling PR will take more time to merge regardless of the GC problem

Dedup is disabled without this PR (64271) so the issue doesn't break anything. I rather wait for the throttling PR to be merged and solve the problem as pushing a stand alone PR with a few lines will still take me hours of works to push (going over multiple unrelated errors ...)

it seems like it broke the cls_ref_count unit tests?

dedup code can not be activated without this PR. The existing code only runs which doesn't call delete

  • cls code is independent of RGW - so it is irrelevant if dedup is activated or not
  • if you dont want a separate PR, please add the fix to this one (instead of the throttling one)

dedup code doesn't change ref_count cls. The problem was the dedup exec was removing duplicated tail-objects using librados.remove() instead of sending a CLS to decrement the ref-count

so, this mean that the above failure is unrelated to this PR?

The PR enabled full dedup which means dedup-tests might lead to this issue.
I'm still unsure how this could happen since dedup tests starts with a clean system and remove all their objects afterwards.
Unless someone else added call to dedup somewhere this issue should never be triggered

@yuvalif

yuvalif commented Aug 26, 2025

Copy link
Copy Markdown
Contributor

@benhanokh can please you split the ref_count issue into its own PR or add it here? the throttling PR will take more time to merge regardless of the GC problem

Dedup is disabled without this PR (64271) so the issue doesn't break anything. I rather wait for the throttling PR to be merged and solve the problem as pushing a stand alone PR with a few lines will still take me hours of works to push (going over multiple unrelated errors ...)

it seems like it broke the cls_ref_count unit tests?

dedup code can not be activated without this PR. The existing code only runs which doesn't call delete

  • cls code is independent of RGW - so it is irrelevant if dedup is activated or not
  • if you dont want a separate PR, please add the fix to this one (instead of the throttling one)

dedup code doesn't change ref_count cls. The problem was the dedup exec was removing duplicated tail-objects using librados.remove() instead of sending a CLS to decrement the ref-count

so, this mean that the above failure is unrelated to this PR?

The PR enabled full dedup which means dedup-tests might lead to this issue. I'm still unsure how this could happen since dedup tests starts with a clean system and remove all their objects afterwards. Unless someone else added call to dedup somewhere this issue should never be triggered

looks like test_cls_refcount.sh failed. it is a unit test, unrelated to RGW or any of the dedup code running inside the RGW.
you can run a local vstart cluster (no RGW needed there), and execute the tests:

bin/ceph_test_cls_refcount

see if they work or have any issue. this is testing only the cls part

@yuvalif

yuvalif commented Aug 26, 2025

Copy link
Copy Markdown
Contributor

@ivancich when i run cls_refcount.test_implicit_idempotent_ec on a local vstart setup, the test hangs, similarly to what we see in the teuthology failures. i test against main so, this is unrelated to this PR.
is this a known issue?

@adamemerson

Copy link
Copy Markdown
Contributor

I approved the Anrao2 branch this was part of, but I don't want to overrule you if you have another test you want to check.

@anrao19

anrao19 commented Sep 12, 2025

Copy link
Copy Markdown
Contributor

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants