You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-07 03:22:57 +03:00
MCOL-4347: catch exceptions during smcat/smls/smput/smrm on IOC::get()
This commit is contained in:
@@ -55,6 +55,8 @@ void catFileOffline(const char *filename, int prefixlen)
|
||||
uint8_t data[8192];
|
||||
off_t offset = 0;
|
||||
int read_err, write_err, count;
|
||||
try
|
||||
{
|
||||
boost::scoped_ptr<IOCoordinator> ioc(IOCoordinator::get());
|
||||
|
||||
do {
|
||||
@@ -80,6 +82,11 @@ void catFileOffline(const char *filename, int prefixlen)
|
||||
offset += read_err;
|
||||
} while (read_err > 0);
|
||||
}
|
||||
catch (exception &e)
|
||||
{
|
||||
cerr << "smcat catFileOffline FAIL: " << e.what() << endl;
|
||||
}
|
||||
}
|
||||
|
||||
void catFileOnline(const char *filename, int prefixlen)
|
||||
{
|
||||
|
@@ -57,6 +57,8 @@ bool SMOnline()
|
||||
}
|
||||
|
||||
void lsOffline(const char *path)
|
||||
{
|
||||
try
|
||||
{
|
||||
boost::scoped_ptr<IOCoordinator> ioc(IOCoordinator::get());
|
||||
vector<string> listing;
|
||||
@@ -95,6 +97,11 @@ void lsOffline(const char *path)
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (exception &e)
|
||||
{
|
||||
cerr << "smls lsOffline FAIL: " << e.what() << endl;
|
||||
}
|
||||
}
|
||||
|
||||
void lsOnline(const char *path)
|
||||
{
|
||||
|
@@ -57,7 +57,8 @@ void putOffline(const char *fname, int prefixlen)
|
||||
uint8_t data[8192];
|
||||
int read_err, write_err;
|
||||
ssize_t count, offset = 0;
|
||||
|
||||
try
|
||||
{
|
||||
boost::scoped_ptr<IOCoordinator> ioc(IOCoordinator::get());
|
||||
struct stat _stat;
|
||||
read_err = ioc->open(fname, O_CREAT | O_TRUNC | O_WRONLY, &_stat);
|
||||
@@ -94,6 +95,11 @@ void putOffline(const char *fname, int prefixlen)
|
||||
offset += read_err;
|
||||
} while (read_err > 0);
|
||||
}
|
||||
catch (exception &e)
|
||||
{
|
||||
cerr << "smput putOffline FAIL: " << e.what() << endl;
|
||||
}
|
||||
}
|
||||
|
||||
void putOnline(const char *fname, int prefixlen)
|
||||
{
|
||||
|
@@ -53,6 +53,8 @@ bool SMOnline()
|
||||
#define min(x, y) (x < y ? x : y)
|
||||
|
||||
void rmOffline(int argCount, const char **args, const char *prefix, uint prefixlen)
|
||||
{
|
||||
try
|
||||
{
|
||||
boost::scoped_ptr<IOCoordinator> ioc(IOCoordinator::get());
|
||||
char buf[16384];
|
||||
@@ -64,6 +66,11 @@ void rmOffline(int argCount, const char **args, const char *prefix, uint prefixl
|
||||
ioc->unlink(buf);
|
||||
}
|
||||
}
|
||||
catch (exception &e)
|
||||
{
|
||||
cerr << "smrm rmOffline FAIL: " << e.what() << endl;
|
||||
}
|
||||
}
|
||||
|
||||
void rmOnline(int argCount, const char **args, const char *prefix, uint prefixlen)
|
||||
{
|
||||
|
Reference in New Issue
Block a user