MCPcopy Create free account
hub / github.com/apache/cloudberry / postResponseWithRetries

Method postResponseWithRetries

gpcontrib/gpcloud/src/s3interface.cpp:81–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79};
80
81Response S3InterfaceService::postResponseWithRetries(const string &url, HTTPHeaders &headers,
82 const vector<uint8_t> &data,
83 uint64_t retries) {
84 string message;
85 uint64_t retry = retries;
86
87 while (retry--) {
88 try {
89 return this->restfulService->post(url, headers, data);
90 } catch (S3ConnectionError &e) {
91 message = e.getMessage();
92 if (S3QueryIsAbortInProgress()) {
93 S3_DIE(S3QueryAbort, "Uploading is interrupted");
94 }
95 S3WARN("Failed to get a good response in POST from '%s', retrying ...", url.c_str());
96 }
97 };
98
99 S3_DIE(S3FailedAfterRetry, url, retries, message);
100}
101
102bool S3InterfaceService::isKeyExisted(ResponseCode code) {
103 return isSuccessfulResponse(code);

Callers 3

getUploadIdMethod · 0.95
completeMultiPartMethod · 0.95
TEST_FFunction · 0.80

Calls 3

postMethod · 0.80
S3QueryIsAbortInProgressFunction · 0.70
getMessageMethod · 0.45

Tested by 1

TEST_FFunction · 0.64