Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Commit

Permalink
rgw/sfs: RGW_ATTR_OBJECT_RETENTION, avoid redundant copy in writer.cc
Browse files Browse the repository at this point in the history
In SFSAtomicWriter::complete(), when put RGW_ATTR_OBJECT_RETENTION
attribute in attrs, directly encode RGWObjectRetention object in the
map.

Signed-off-by: Giuseppe Baccini <[email protected]>
  • Loading branch information
Giuseppe Baccini committed Nov 22, 2023
1 parent d4b05d4 commit b042774
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/rgw/driver/sfs/writer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,7 @@ int SFSAtomicWriter::complete(
bucketref->get_info().obj_lock.get_lock_until_date(now);
string mode = bucketref->get_info().obj_lock.get_mode();
RGWObjectRetention obj_retention(mode, lock_until_date);
bufferlist bl;
obj_retention.encode(bl);
attrs[RGW_ATTR_OBJECT_RETENTION] = bl;
encode(obj_retention, attrs[RGW_ATTR_OBJECT_RETENTION]);
}
}

Expand Down

0 comments on commit b042774

Please sign in to comment.