You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
MCOL-5177: Error handling for HTTP 301 response from AWS S3. (#2570)
This commit is contained in:
@ -72,7 +72,8 @@ const int s3err_to_errno[] = {
|
|||||||
ENOENT, // 9 MS3_ERR_NOT_FOUND
|
ENOENT, // 9 MS3_ERR_NOT_FOUND
|
||||||
EPROTO, // 10 MS3_ERR_SERVER
|
EPROTO, // 10 MS3_ERR_SERVER
|
||||||
EMSGSIZE, // 11 MS3_ERR_TOO_BIG
|
EMSGSIZE, // 11 MS3_ERR_TOO_BIG
|
||||||
EKEYREJECTED // 12 MS3_ERR_AUTH_ROLE
|
EKEYREJECTED, // 12 MS3_ERR_AUTH_ROLE
|
||||||
|
EFAULT // 13 MS3_ERR_ENDPOINT
|
||||||
};
|
};
|
||||||
|
|
||||||
const char* s3err_msgs[] = {"All is well",
|
const char* s3err_msgs[] = {"All is well",
|
||||||
@ -87,7 +88,8 @@ const char* s3err_msgs[] = {"All is well",
|
|||||||
"Object not found",
|
"Object not found",
|
||||||
"Unknown error code in response",
|
"Unknown error code in response",
|
||||||
"Data to PUT is too large; 4GB maximum length",
|
"Data to PUT is too large; 4GB maximum length",
|
||||||
"Authentication failed, token has expired"};
|
"Authentication failed, token has expired",
|
||||||
|
"Configured bucket does not match endpoint location"};
|
||||||
|
|
||||||
S3Storage::ScopedConnection::ScopedConnection(S3Storage* s, ms3_st* m) : s3(s), conn(m)
|
S3Storage::ScopedConnection::ScopedConnection(S3Storage* s, ms3_st* m) : s3(s), conn(m)
|
||||||
{
|
{
|
||||||
@ -506,6 +508,9 @@ int S3Storage::putObject(const boost::shared_array<uint8_t> data, size_t len, co
|
|||||||
logger->log(LOG_ERR, "S3Storage::putObject(): failed to PUT, got '%s'. bucket = %s, key = %s.",
|
logger->log(LOG_ERR, "S3Storage::putObject(): failed to PUT, got '%s'. bucket = %s, key = %s.",
|
||||||
s3err_msgs[s3err], bucket.c_str(), destKey.c_str());
|
s3err_msgs[s3err], bucket.c_str(), destKey.c_str());
|
||||||
errno = s3err_to_errno[s3err];
|
errno = s3err_to_errno[s3err];
|
||||||
|
if (s3err == MS3_ERR_ENDPOINT)
|
||||||
|
logger->log(LOG_ERR, "S3Storage::putObject(): Bucket location not match provided endpoint:, bucket = %s, endpoint = %s.",
|
||||||
|
bucket.c_str(), endpoint.c_str());
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Submodule utils/libmarias3/libmarias3 updated: 32b94fff37...d7028f429b
Reference in New Issue
Block a user