Project

General

Profile

Actions

Bug #21895

closed

multisite: destination zone does not compress synced objects

Added by Casey Bodley over 6 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
High
Assignee:
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

When a zone has compression enabled, objects that it fetches from other zones via RGWRados::fetch_remote_obj() are not compressed.

There is a block of code in RGWPutObj_Compress::handle_data() which ensures that we only compress entire objects:

    if ((ofs > 0 && compressed) || // if previous part was compressed
        (ofs == 0)) {              // or it's the first part

But in the case of fetch_remote_obj(), the first value of ofs we see here is 4776. This corresponds with the value of 'Rgwx-Embedded-Metadata-Len: 4776', which is the amount of object metadata in the HTTP request body that precedes the actual object data. So the problem is that the PutObj filters are seeing an offset into the HTTP request body, rather than a logical offset into the object data itself.


Related issues 1 (0 open1 closed)

Copied to rgw - Backport #22027: luminous: multisite: destination zone does not compress synced objectsResolvedActions
Actions

Also available in: Atom PDF