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-4989: Fix error handling for misconfigured StorageManager startup. (#2385)
This commit is contained in:
@ -56,7 +56,18 @@ CloudStorage* CloudStorage::get()
|
||||
if (inst)
|
||||
return inst;
|
||||
if (type == "s3")
|
||||
inst = new S3Storage();
|
||||
{
|
||||
try
|
||||
{
|
||||
inst = new S3Storage();
|
||||
}
|
||||
catch (exception& e)
|
||||
{
|
||||
cout << "S3 Storage Manager Configuration Error:" << endl;
|
||||
cout << e.what() << endl;
|
||||
throw runtime_error("S3Storage: Failed");
|
||||
}
|
||||
}
|
||||
else if (type == "local" || type == "localstorage")
|
||||
inst = new LocalStorage();
|
||||
else
|
||||
|
@ -52,7 +52,7 @@ static size_t WriteCallback(void* contents, size_t size, size_t nmemb, void* use
|
||||
inline bool retryable_error(uint8_t s3err)
|
||||
{
|
||||
return (s3err == MS3_ERR_RESPONSE_PARSE || s3err == MS3_ERR_REQUEST_ERROR || s3err == MS3_ERR_OOM ||
|
||||
s3err == MS3_ERR_IMPOSSIBLE || s3err == MS3_ERR_AUTH || s3err == MS3_ERR_SERVER ||
|
||||
s3err == MS3_ERR_IMPOSSIBLE || s3err == MS3_ERR_SERVER ||
|
||||
s3err == MS3_ERR_AUTH_ROLE);
|
||||
}
|
||||
|
||||
@ -294,6 +294,12 @@ void S3Storage::testConnectivityAndPerms()
|
||||
err = deleteObject(testObjKey);
|
||||
if (err)
|
||||
FAIL(DELETE)
|
||||
err = exists(testObjKey, &_exists);
|
||||
if (err)
|
||||
{
|
||||
logger->log(LOG_CRIT, "S3Storage::exists() failed on nonexistent object. Check 'ListBucket' permissions.");
|
||||
FAIL(HEAD)
|
||||
}
|
||||
logger->log(LOG_INFO, "S3Storage: S3 connectivity & permissions are OK");
|
||||
}
|
||||
|
||||
|
@ -87,6 +87,7 @@ void catFileOffline(const char* filename, int prefixlen)
|
||||
catch (exception& e)
|
||||
{
|
||||
cerr << "smcat catFileOffline FAIL: " << e.what() << endl;
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user