Skip to content

Commit 12c44b0

Browse files
authored
Merge pull request ceph#63750 from yuvalif/wip-yuval-71563
rgw/logging: log only object ACls in journal mode Reviewed-by: Casey Bodley <[email protected]>
2 parents 71f5a7d + ce2d09e commit 12c44b0

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

src/rgw/rgw_op.cc

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6370,17 +6370,20 @@ void RGWPutACLs::execute(optional_yield y)
63706370
return;
63716371
}
63726372

6373-
const auto etag = s->object->get_attrs()[RGW_ATTR_ETAG].to_str();
6374-
op_ret = rgw::bucketlogging::log_record(driver,
6375-
rgw::bucketlogging::LoggingType::Journal,
6376-
s->object.get(),
6377-
s,
6378-
canonical_name(),
6379-
etag,
6380-
s->object->get_size(),
6381-
this, y, false, false);
6382-
if (op_ret < 0) {
6383-
return;
6373+
if (!rgw::sal::Object::empty(s->object)) {
6374+
// in journal mode we log only object ACLs
6375+
const auto etag = s->object->get_attrs()[RGW_ATTR_ETAG].to_str();
6376+
op_ret = rgw::bucketlogging::log_record(driver,
6377+
rgw::bucketlogging::LoggingType::Journal,
6378+
s->object.get(),
6379+
s,
6380+
canonical_name(),
6381+
etag,
6382+
s->object->get_size(),
6383+
this, y, false, false);
6384+
if (op_ret < 0) {
6385+
return;
6386+
}
63846387
}
63856388

63866389
bufferlist bl;

0 commit comments

Comments
 (0)