Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rgw: avoid infinite loop when ECANCELED for rgw_get_system_obj #12179

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/rgw/rgw_tools.cc
Expand Up @@ -47,6 +47,9 @@ int rgw_get_system_obj(RGWRados *rgwstore, RGWObjectCtx& obj_ctx, rgw_bucket& bu
int request_len = READ_CHUNK_LEN;
rgw_obj obj(bucket, key);

#define RGW_GET_SYSEM_OBJ_RETRIES 10

int retry_count = RGW_GET_SYSEM_OBJ_RETRIES;
do {
RGWRados::SystemObject source(rgwstore, obj_ctx, obj);
RGWRados::SystemObject::Read rop(&source);
Expand All @@ -73,7 +76,7 @@ int rgw_get_system_obj(RGWRados *rgwstore, RGWObjectCtx& obj_ctx, rgw_bucket& bu
break;
bl.clear();
request_len *= 2;
} while (true);
} while ( --retry_count > 0);

return 0;
}
Expand Down