Skip to content

rgw: copy_obj_data() record uncompressed size for a compressed source - #70006

Merged
BBoozmen merged 1 commit into
ceph:mainfrom
BBoozmen:wip-oozmen-75716-75715
Jul 15, 2026
Merged

BBoozmen merged 1 commit into
ceph:mainfrom
BBoozmen:wip-oozmen-75716-75715

Conversation

@BBoozmen

@BBoozmen BBoozmen commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Fixes: https://tracker.ceph.com/issues/75716
Fixes: https://tracker.ceph.com/issues/75715

This is the same class of bug as the resolved tracker #63306, but on a code path
that fix did not cover (copy_obj + random compression rolls).

When copying an object and a compressor/encryption processor is configured for the destination, the bucket-index accounted_size was set from ofs. If the source is compressed but the destination is not (re-)compressed (e.g. compression is off, or rgw_compression_type=random rolled no-compression), then ofs is the compressed size, not the logical size.

In multisite this diverges from the peer zone, which recomputes its own accounted_size via fetch_remote_obj() (already corrected in #63306). ListObjectVersions then reports different sizes per zone.

Pass along the source's logical size (astate->accounted_size, derived from the object's own attrs and correct for plain/compressed/encrypted) into copy_obj_data() and use it when the destination is not compressed. The rewrite_obj() and transition_obj() callers pass 0 and keep the prior ofs-based behaviour. This is the copy_obj analog of the fetch_remote_obj fix in #63306.

No on-disk/encoding change; corrects newly copied objects only (existing index entries are unaffected) and is safe across a mixed-version upgrade.

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

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

When copying an object and a compressor/encryption processor is configured
for the destination, the bucket-index accounted_size was set from `ofs`. If
the source is compressed but the destination is not (re-)compressed (e.g.
compression is off, or rgw_compression_type=random rolled no-compression),
then `ofs` is the compressed size, not the logical size.

In multisite this diverges from the peer zone, which recomputes its own
accounted_size via fetch_remote_obj() (already corrected in ceph#63306).
ListObjectVersions then reports different sizes per zone.

Pass along the source's logical size (astate->accounted_size, derived from the
object's own attrs and correct for plain/compressed/encrypted) into
copy_obj_data() and use it when the destination is not compressed. The
rewrite_obj() and transition_obj() callers pass 0 and keep the prior
ofs-based behaviour. This is the copy_obj analog of the fetch_remote_obj
fix in ceph#63306.

No on-disk/encoding change; corrects newly copied objects only (existing
index entries are unaffected) and is safe across a mixed-version upgrade.

Fixes: https://tracker.ceph.com/issues/75716
Fixes: https://tracker.ceph.com/issues/75715
Signed-off-by: Oguzhan Ozmen <[email protected]>
@BBoozmen BBoozmen self-assigned this Jul 7, 2026
@BBoozmen
BBoozmen marked this pull request as ready for review July 7, 2026 16:20
@BBoozmen
BBoozmen requested a review from a team as a code owner July 7, 2026 16:20
@github-actions github-actions Bot added the rgw label Jul 7, 2026
@mheler

mheler commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

@BBoozmen would you mind taking a look at #67725 in which I fixed this issue?

@BBoozmen

BBoozmen commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

@BBoozmen would you mind taking a look at #67725 in which I fixed this issue?

Yes, let me take a look.

@BBoozmen

BBoozmen commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

@BBoozmen would you mind taking a look at #67725 in which I fixed this issue?

Yes, I think it fixes the issue we are seeing in these testcases.

What is the merge timeline and will it be backported umbrella & tentacle?
If #67725 won't be backported, we may still want this more targeted fix.
Otherwise, I can close this one.

@BBoozmen BBoozmen added needs-qa wip-oozmen-testing for teuthology integration testing to be used via build-integration-branch.sh labels Jul 9, 2026
@BBoozmen

Copy link
Copy Markdown
Contributor Author

ceph-ci branch: https://github.com/ceph/ceph-ci/commits/wip-oozmen-cp-obj-data-testing-2026-07-09-1646/
QA Testing Results: https://pulpito.ceph.com/bcs-ceph-2026-07-13_19:07:02-rgw-wip-oozmen-cp-obj-data-testing-2026-07-09-1646-distro-default-trial/
Test Run Summary:

  • Total: 79 tests
  • Passed: 76 (both multisite jobs passed including the 2 testcases this PR addresses)
  • Failed: 3 (all infrastructure-related)
  • Dead: 0

Classification of 3 failures:

# Suite Variant Job ID OS Status Root Cause
1 rgw/notifications kafka_failover 362923 ubuntu 22.04 FAIL Infra: Kafka download 404 — dlcdn.apache.org mirror returned 404 on kafka_2.13-3.9.2.tgz
2 rgw/notifications kafka 362908 centos 9.stream FAIL Infra: Kafka download 404 — same mirror/version issue as Job 362923
3 rgw/d4n — 362854 centos 9.stream FAIL Known infra: d4n SSDDriver failed to initialize — missing cache dir /tmp/rgw_d4n_datacache/; RGW crashed with filesystem_error: cannot get free space: No such file or directory

@BBoozmen BBoozmen added TESTED and removed wip-oozmen-testing for teuthology integration testing to be used via build-integration-branch.sh labels Jul 14, 2026
@BBoozmen
BBoozmen merged commit 7a3b1ae into ceph:main Jul 15, 2026
7 checks passed
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.

3 participants