So I've been playing with the ObjectOperationCompletion code a bit. It seems to be really important to be able to handle decoding errors in in the handle_completion() callback. In particular, I'd like to be able to reach out and set the return value the user will see in the AioCompletion. Any thoughts on dealing with this some how? -Noah On Mar 4, 2013, at 11:44 AM, Yehuda Sadeh <yehuda@xxxxxxxxxxx> wrote: > On Mon, Mar 4, 2013 at 11:34 AM, Noah Watkins <jayhawk@xxxxxxxxxxx> wrote: >> >> On Mar 3, 2013, at 6:31 PM, Yehuda Sadeh <yehuda@xxxxxxxxxxx> wrote: >> >>> I pushed the wip-librados-exec branch last week that solves a similar >>> issue. I added two more ObjectOperation::exec() api calls. The more >>> interesting one added a callback context that is called with the >>> output buffer of the completed sub-op. Currently in order to use it >>> you'll need to use operate()/aio_operate(), however, a similar >>> aio_exec interface can be added. >> >> Thanks for the pointer to the branch. So, if I understand correctly, >> we might have a new librados::aio_exec_completion call that accepts >> a completion object? For example: >> >> aio_exec_completion(AioCompletion *c, bufferlist *outbl, >> ObjectOperationCompletion* completion) >> { >> Context *onack = new C_aio_Ack(c); >> >> ::ObjectOperation rd; >> ObjectOpCompletionCtx *ctx = new ObjectOpCompletionCtx(completion); >> rd.call(cls, method, inbl, ctx->outbl, ctx, NULL); >> objecter->read(oid, oloc, rd, snap_seq, outbl, 0, onack, &c->objver); >> >> return 0; >> } >> >> where the caller would provide an ObjectOperationCompletion where it's >> finish(..) would unwrap the protocol? > > Right. > >> >> Do you expect wip-librados-exec going up stream pretty soon, and would > > We can push it ahead if needed, it doesn't depend on any of the stuff > I'm working on right now. It just waits for someone to properly review > it. > >> something like librados::aio_exec_completion be a candidate for adding >> to librados? >> > > Sure, if there's a need then I don't see why not. > > Yehuda -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html