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

Method headResponseWithRetries

gpcontrib/gpcloud/src/s3interface.cpp:106–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106ResponseCode S3InterfaceService::headResponseWithRetries(const string &url, HTTPHeaders &headers,
107 uint64_t retries) {
108 string message;
109 uint64_t retry = retries;
110
111 while (retry--) {
112 try {
113 return this->restfulService->head(url, headers);
114 } catch (S3ConnectionError &e) {
115 message = e.getMessage();
116 if (S3QueryIsAbortInProgress()) {
117 S3_DIE(S3QueryAbort, "Uploading is interrupted");
118 }
119
120 S3WARN("Failed to get a good response in HEAD from '%s', retrying ...", url.c_str());
121 }
122 };
123
124 S3_DIE(S3FailedAfterRetry, url, retries, message);
125}
126
127Response S3InterfaceService::deleteRequestWithRetries(const string &url, HTTPHeaders &headers,
128 uint64_t retries) {

Callers 1

TEST_FFunction · 0.80

Calls 3

headMethod · 0.80
S3QueryIsAbortInProgressFunction · 0.70
getMessageMethod · 0.45

Tested by 1

TEST_FFunction · 0.64