Fantastic. Thanks!

-Noah

On Apr 19, 2012, at 12:34 PM, Yehuda Sadeh Weinraub wrote:

> On Thu, Apr 19, 2012 at 12:04 PM, Noah Watkins <[email protected]> wrote:
>> I've had a lot of success using rados_exec(), but I need to graduate the 
>> implementation to use IoCtx::aio_exec for increased concurrency. I'm a 
>> little confused about how aio_exec should be used:
>> 
>> Here is aio_exec:
>> 
>>   int aio_exec(const std::string& oid, AioCompletion *c, const char *cls, 
>> const char *method, bufferlist& inbl, bufferlist *outbl);
>> 
>> I'd like to have many outstanding competitions, one for each call of 
>> aio_exec. Once @c has completed, I'd like to have access to the @outbl 
>> bufferlist. So, is the intended use here to allocate an empty bufferlist for 
>> each submitted completion?
> 
> Yes, you'll need to have a bufferlist for each request sent if your
> exec is expected to return data. Note that only read operations should
> return data.
>> 
>> In rgw/rgw_rados.cc a use is:
>> 
>>  AioCompletion *c = librados::Rados::aio_create_completion(NULL, NULL, NULL);
>>  r = io_ctx.aio_exec(oid, c, "rgw", "dir_suggest_changes", in, NULL);
>>  c->release();
>> 
>> To clarify, are the semantics here that an asynchronous aio_exec is made 
>> without checking for completion or return values.
> 
> Right. We send the "dir_suggest_changes" request and dropping the
> reference, so that we can't get the return value once it's done.
> 
> Yehuda

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to