-
Notifications
You must be signed in to change notification settings - Fork 6k
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/aio: remove RGWSI_RADOS from generic Aio::get() #50347
Conversation
@@ -28,10 +28,11 @@ void cb(librados::completion_t, void* arg); | |||
|
|||
struct state { | |||
Aio* aio; | |||
librados::IoCtx ctx; |
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.
AioResult::user_data
has enough space for 3 pointers, and librados::IoCtx
should only contain one pointer to IoCtxImpl
, so state
should still fit
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.
doh, IoCtx is ref-counted so fails this static assertion:
rgw_aio.cc:41:22: error: static assertion failed
41 | static_assert(std::is_trivially_destructible_v<state>);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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.
@adamemerson can't the librados callback just call state
's destructor?
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.
@adamemerson can't the librados callback just call
state
's destructor?
No reason it couldn't so long as we document that it will have to.
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.
thanks, i added some extra comments here. i was also missing a call to the destructor in aio_abstract()
's error path
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.
valgrind complains about a use-after-free of this librados::IoCtx
; an io_context_pool
thread calls IoCtx::close()
after this ~state()
destructor runs
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.
just had to call the destructor before aio->put(r);
woke up the calling thread
from IRC:
|
@@ -34,7 +32,7 @@ struct D3nGetObjData; | |||
namespace rgw { | |||
|
|||
struct AioResult { | |||
RGWSI_RADOS::Obj obj; | |||
rgw_raw_obj obj; |
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.
@cbodley : In case of non rados stores/ filters, can pool and loc be left uninitialised?
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.
Also, can I use this PR now, to get past the segfault that I encountered?
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.
@cbodley : In case of non rados stores/ filters, can pool and loc be left uninitialised?
yeah. i used rgw_raw_obj
isntead of just std::string
here because the rados backend needs to know the pool/loc of the write completions it gets, but other backends don't need them
Also, can I use this PR now, to get past the segfault that I encountered?
it builds and passes s3tests, so it's worth a shot!
c0be574
to
8f7517f
Compare
8f7517f
to
86e31fd
Compare
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
run it as a unittest instead of a workunit Signed-off-by: Casey Bodley <cbodley@redhat.com>
5d8c519
to
585b6c1
Compare
Signed-off-by: Casey Bodley <cbodley@redhat.com>
585b6c1
to
b929958
Compare
@adamemerson could i ask for your final review please? |
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.
This is a good PR and I approve of it.
so that
rgw::Aio
and itsAioThrottle
subclasses can be used outside of the rados backendthe idea is to move all of the rados-specifics into the
librados_op()
calls. this only changes the basergw::Aio
class, so doesn't compile yet. next we'd need to update theAioThrottle
classes, and theAio
callers in rgw_rados.cc, rgw_putobj_processor.cc, and rgw_d3n_datacache.hShow 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