New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rgw: store torrent file for GetObjectTorrent in object attrs instead of omap #50168
Conversation
cc @robbat2 since you were involved with torrent issues in the past |
5d5795b
to
4364c9c
Compare
@@ -203,6 +204,21 @@ ssl::OpenSSLDigest::~OpenSSLDigest() { | |||
} | |||
} | |||
|
|||
ssl::OpenSSLDigest::OpenSSLDigest(OpenSSLDigest&& o) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you fixed a real howler here, well done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm hoping that nobody's tried copying/moving these before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice cleanup.
return -ENOENT; | ||
} | ||
bl = std::move(result.begin()->second); | ||
return 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this store it in the attribute to be future proof? Or are we just going to leave it in the omap for old object?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think we'll have to support this omap fallback forever, even if we do add conversion logic here. so i don't think it's worth paying for an object write to convert stuff during GetObj
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, sounds good.
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
copy and move operations were not deleted, so the compiler-generated move operations were implemented as copies. the destructor of the copied-from instance would destroy the handles that were still in use by the copied-to instance, resulting in use-after-free or double-free to prevent this, add noexcept move operations that leave the moved-from instance empty. this also prevents the compiler from generating the problematic copy operations Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
although torrent info is moving into RGW_ATTR_TORRENT, we'll still need to support the rados backend's omap fallback.. forever. expose a new Object API specifically for torrent info so we can remove all of the omap-specific ones Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
this is causing test failures in |
Signed-off-by: Casey Bodley <cbodley@redhat.com>
when
rgw_torrent_flag
is enabled, new object uploads store the torrent inRGW_ATTR_TORRENT
instead of the head object's omap. omap doesn't work for EC pools, and required a separate (non-atomic) write after the head object was writtenFixes: https://tracker.ceph.com/issues/23838
a new
get_torrent_info()
function was added torgw::sal::Object
for this, with a default implementation inrgw::sal::StoreObject
that reads directly from attrs. for backward compatibility,RadosObject
will fall back to omap ifStoreObject
doesn't findRGW_ATTR_TORRENT
this reimplements
class seed
as argw::putobj::Pipe
forRGWPutObj
and as a free functionrgw_read_torrent_file()
forRGWGetObj
, then cleans up the header dependencies in generala new
rgw_torrent_max_size
option was added, with the same 5G default that aws uses, to preventRGWPutObj_Torrent
from buffering too many sha hashesthe
RGWPutObj::get_torrent_filter()
function requiresRGWPutObj_Torrent
to be movable, but itsceph::crypto::SHA1
member crashed after move. that's why the commitcrypto: enable move construct/assign for OpenSSLDigest
was necessaryfor testing, the rgw/verify suite enables
rgw_torrent_flag
by default. a test case forGetObjectTorrent
was added in ceph/s3-tests#495my real motivation for this project was to finally get the rados-specific omap APIs out of
sal::Object
Show available Jenkins commands
jenkins retest this please
jenkins test classic perf
jenkins test crimson perf
jenkins test signed
jenkins test make check
jenkins test make check arm64
jenkins test submodules
jenkins test dashboard
jenkins test dashboard cephadm
jenkins test api
jenkins test docs
jenkins render docs
jenkins test ceph-volume all
jenkins test ceph-volume tox
jenkins test windows