rgw: fix miss handle curl error return#28345
Conversation
|
@cbodley @xiaoxichen maybe this is the root cause of https://tracker.ceph.com/issues/39992 |
|
I think it is possible with (result = CURLE_PARTIAL_FILE and http_code = 200) however in previous code it also result an EAGAIN, isnt it? |
|
@xiaoxichen the http_status is the http_code, so it will not return EAGAIN |
status == 0 for your case where http_status = 200; why it will not go to EAGAIN? |
|
the condition here needs http_status == 0, but we got http_status = 200, so it will not return EAGAIN, and the status is 0, so the next finish_request will also not return error |
|
sigh...I read your new code...yes you are right. |
|
thanks @tianshan! i wrote a test case for this and pushed it to https://github.com/cbodley/ceph/commits/wip-rgw-http-err, could you please include that commit cbodley@cfb452b in this pr? without your fix applied, the test fails with: with your fix, it passes with a warning: |
if meet tcp packet loss, curl return will be result=18(CURLE_PARTIAL_FILE) and http_status=200, so sync will continue and cause content miss match. Fixes: https://tracker.ceph.com/issues/39992 Signed-off-by: Tianshan Qu <tianshan@xsky.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
36eabfa to
c669cf2
Compare
|
@cbodley done. and removed the if condition around dout in my commit, since status == 0 mostly means http_status = 200 |
if meet tcp packet loss, curl return will be result=18(CURLE_PARTIAL_FILE)
and http_status=200, so sync will continue and cause content miss match.
Signed-off-by: Tianshan Qu tianshan@xsky.com