[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ceph-dev
Subject:    Broken "bucket sync markers" command
From:       Yixin Jin <yjin77 () yahoo ! ca>
Date:       2023-04-26 16:13:17
Message-ID: 1371925071.399038.1682525597338 () mail ! yahoo ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi folks,
I think "bucket sync markers" command is broken in the main branch. It always gives \
                back this "error":
ERROR: sync.read_sync_status() returned error=0
which shouldn't be an error at all. And it doesn't display anything back. I traced it \
back to a last year's change into rgw_data_sync.cc: 

rgw: Disentangle read_sync_status from RemoteBucketManager  · ceph/ceph@c09155f
Since remote_info() call returns a negative value for an error and 0 for success, at \
line 5556 in this commit, it really should check if "ret < 0", not "!ret" for error \
cases. The consequence is that success is always interpreted as failure, which leads \
to the strange output from "bucket sync markers". Changing that condition check fixes \
the issue. I don't think such a small change would warrant a issue ticket and hope \
someone could just piggyback it in his next PR. 

Thanks,Yixin


[Attachment #5 (text/html)]

<html><head></head><body><div class="yahoo-style-wrap" style="font-family:Helvetica \
Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div dir="ltr" \
data-setdir="false">Hi folks,</div><div dir="ltr" data-setdir="false"><br></div><div \
dir="ltr" data-setdir="false">I think "bucket sync markers" command is broken in the \
main branch. It always gives back this "error":</div><div dir="ltr" \
data-setdir="false"><br></div><div dir="ltr" data-setdir="false"><span>ERROR: \
sync.read_sync_status() returned error=0</span></div><div dir="ltr" \
data-setdir="false"><span><br></span></div><div dir="ltr" \
data-setdir="false"><span>which shouldn't be an error at all. And it doesn't display \
anything back. I traced it back to a last year's change into rgw_data_sync.cc: \
<br></span></div><div dir="ltr" data-setdir="false"><span><br></span></div><div \
dir="ltr" data-setdir="false"><a \
href="https://github.com/ceph/ceph/commit/c09155f7509f50900af2f9e16d70db4977c75d22" \
rel="nofollow" target="_blank" class="enhancr_card_3372054395">rgw: Disentangle \
read_sync_status from RemoteBucketManager  · ceph/ceph@c09155f</a></div><div \
dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">Since \
remote_info() call returns a negative value for an error and 0 for success, at line \
5556 in this commit, it really should check if "ret &lt; 0", not "!ret" for error \
cases. The consequence is that success is always interpreted as failure, which leads \
to the strange output from "bucket sync markers". Changing that condition check fixes \
the issue.</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" \
data-setdir="false">I don't think such a small change would warrant a issue ticket \
and hope someone could just piggyback it in his next PR. <br></div><div dir="ltr" \
data-setdir="false"><br></div><div dir="ltr" data-setdir="false">Thanks,</div><div \
dir="ltr" data-setdir="false">Yixin<br></div><div><br></div><div><br></div><div><br></div><div \
dir="ltr" data-setdir="false"><br></div></div></body></html>



_______________________________________________
Dev mailing list -- dev@ceph.io
To unsubscribe send an email to dev-leave@ceph.io


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic