Re: Bug report: unexpected behavior when executing Lua object class

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

 





On Mon, Jun 5, 2017 at 10:43 AM Noah Watkins <noahwatkins@xxxxxxxxx> wrote:
I haven't taken the time to really grok why the limitation exists
(e.g. i'd be interested in to know if it's fundamental). There is a
comment here:

https://github.com/ceph/ceph/blob/master/src/osd/PrimaryLogPG.cc#L3221

We need to send back identical data if an operation is retried (because, say, an OSD failed and we're sending it to the new primary). That's not possible if an op performs a read (which it returns) and then write, because that (or a later op) may have overwritten the data being read.

Fixing it would require we persist the entire returned bufferlist, which isn't feasible in general. There's a proposal that gets floated periodically about letting write ops return up to 64 bytes or something, and persisting those in the pglog for reliable delivery on retries. But I don't recall if anybody's actually made progress on it. (We did get *closer* to real work last time, at least.)
-Greg
 


- Noah

On Sat, Jun 3, 2017 at 8:18 PM, Zheyuan Chen <zchen137@xxxxxxxx> wrote:
>> Unfortunately, this isn't a bug. Rados clears any returned data from
>> an object class method if the operation also writes to the object.
>
> Do you have any idea why RADOS behaves like this?
>
>
>
> On Sat, Jun 3, 2017 at 9:30 AM, Noah Watkins <noahwatkins@xxxxxxxxx> wrote:
>>
>> Comments inline
>>
>> > ---------- Forwarded message ----------
>> > From: Zheyuan Chen <zchen137@xxxxxxxx>
>> > Date: Sat, Jun 3, 2017 at 1:45 PM
>> > Subject: Bug report: unexpected behavior when executing
>> > Lua object class
>> > To: ceph-users@xxxxxxxxxxxxxx
>> >
>> > Bug 1: I can not get returned output in the first script. "data" is
>> > always empty.
>> >
>> >> import rados, json
>> >> cluster = rados.Rados(conffile='')
>> >> cluster.connect()
>> >> ioctx = cluster.open_ioctx('data')
>> >> cmd = {
>> >>     "script": """
>> >>         function test(input, output)
>> >>             data = ""> >> >>             data:append("test")
>> >>             objclass.write_full(data, #data)
>> >>             output:append("Here is the return value")
>> >>         end
>> >>         objclass.register(test)
>> >>     """,
>> >>     "handler": "test",
>> >>     "input": "",
>> >> }
>> >> # I can not get returned data
>> >> ret, data = "" 'lua', 'eval_json', json.dumps(cmd))
>> >> print ret, data
>>
>> Unfortunately, this isn't a bug. Rados clears any returned data from
>> an object class method if the operation also writes to the object.
>>
>> > Bug 2:
>> > The returned mtime is always 0.
>>
>> This might be a bug, but there are a few things to rule out. Did you
>> write to the object before running stat? There is also a test case
>> here: can you try to run them?
>>
>>
>> https://github.com/ceph/ceph/blob/master/src/test/cls_lua/test_cls_lua.cc#L679
>>
>> - Noah
>
>
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
_______________________________________________
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