Re: Appending to a rados object with feedback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Greg,

Thanks for your feedback.

On 2015-01-27 15:38, Gregory Farnum wrote:
On Mon, Jan 26, 2015 at 6:47 PM, Kim Vandry <vandry@xxxxxxxxx> wrote:
By the way, I have a question about the class. Following the example in
cle_hello.cc method record_hello, our method calls cls_cxx_stat() and yet is
declared CLS_METHOD_WR, not CLS_METHOD_RD|CLS_METHOD_WR. Is stating an
object not considered reading it? How come the method does not need the
CLS_METHOD_RD flag? I tried including that flag to see what would happen but
then my method was unable to create new objects, which we want to support
with the same meaning as appending to a 0-size object. It seems that in that
case Ceph asserts that the objects exists before calling the method.

Mmmm, this actually might be an issue. Write ops don't always force an
object into a readable state before being processed, so you could read
out-of-date status in some cases. :/

I see. I'll change this, then.

I don't have the exact API calls to hand, but librados exposes
versions on op completion and you can assert the version when
submitting ops, too. Did you check that out?

That sounds like exactly what we should be using. I see rados_get_last_version() for reading the version, which I missed before. Unfortunately, I can't find how to assert the version when submitting an op. I'm looking at src/include/rados/librados.h in git. Maybe you or someone else can help me find it once you have the API docs at hand.

-kv
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com




[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux