提交 2c9895b0 编写于 作者: P peng.xu

Merge branch 'branch-0.4.0' into 'branch-0.4.0'

refine code

See merge request megasearch/milvus!515

Former-commit-id: f22fbb79ed5a3f7e2681b865a3b243ebb22fedcc
...@@ -179,12 +179,6 @@ Status MySQLMetaImpl::Initialize() { ...@@ -179,12 +179,6 @@ Status MySQLMetaImpl::Initialize() {
} }
} //Scoped Connection } //Scoped Connection
} catch (const BadQuery &e) {
// Handle any query errors
return HandleException("GENERAL ERROR DURING INITIALIZATION", e.what());
} catch (const Exception &e) {
// Catch-all for any other MySQL++ exceptions
return HandleException("GENERAL ERROR DURING INITIALIZATION", e.what());
} catch (std::exception &e) { } catch (std::exception &e) {
return HandleException("GENERAL ERROR DURING INITIALIZATION", e.what()); return HandleException("GENERAL ERROR DURING INITIALIZATION", e.what());
} }
...@@ -240,12 +234,6 @@ Status MySQLMetaImpl::DropPartitionsByDates(const std::string &table_id, ...@@ -240,12 +234,6 @@ Status MySQLMetaImpl::DropPartitionsByDates(const std::string &table_id,
return HandleException("QUERY ERROR WHEN DROPPING PARTITIONS BY DATES", dropPartitionsByDatesQuery.error()); return HandleException("QUERY ERROR WHEN DROPPING PARTITIONS BY DATES", dropPartitionsByDatesQuery.error());
} }
} //Scoped Connection } //Scoped Connection
} catch (const BadQuery &e) {
// Handle any query errors
return HandleException("GENERAL ERROR WHEN DROPPING PARTITIONS BY DATES", e.what());
} catch (const Exception &e) {
// Catch-all for any other MySQL++ exceptions
return HandleException("GENERAL ERROR WHEN DROPPING PARTITIONS BY DATES", e.what());
} catch (std::exception &e) { } catch (std::exception &e) {
return HandleException("GENERAL ERROR WHEN DROPPING PARTITIONS BY DATES", e.what()); return HandleException("GENERAL ERROR WHEN DROPPING PARTITIONS BY DATES", e.what());
} }
...@@ -316,12 +304,6 @@ Status MySQLMetaImpl::CreateTable(TableSchema &table_schema) { ...@@ -316,12 +304,6 @@ Status MySQLMetaImpl::CreateTable(TableSchema &table_schema) {
return utils::CreateTablePath(options_, table_schema.table_id_); return utils::CreateTablePath(options_, table_schema.table_id_);
} catch (const BadQuery &e) {
// Handle any query errors
return HandleException("GENERAL ERROR WHEN CREATING TABLE", e.what());
} catch (const Exception &e) {
// Catch-all for any other MySQL++ exceptions
return HandleException("GENERAL ERROR WHEN CREATING TABLE", e.what());
} catch (std::exception &e) { } catch (std::exception &e) {
return HandleException("GENERAL ERROR WHEN CREATING TABLE", e.what()); return HandleException("GENERAL ERROR WHEN CREATING TABLE", e.what());
} }
...@@ -406,12 +388,6 @@ Status MySQLMetaImpl::FilesByType(const std::string &table_id, ...@@ -406,12 +388,6 @@ Status MySQLMetaImpl::FilesByType(const std::string &table_id,
<< " index files:" << index_count << " backup files:" << backup_count; << " index files:" << index_count << " backup files:" << backup_count;
} }
} catch (const BadQuery &e) {
// Handle any query errors
return HandleException("GENERAL ERROR WHEN GET FILE BY TYPE", e.what());
} catch (const Exception &e) {
// Catch-all for any other MySQL++ exceptions
return HandleException("GENERAL ERROR WHEN GET FILE BY TYPE", e.what());
} catch (std::exception &e) { } catch (std::exception &e) {
return HandleException("GENERAL ERROR WHEN GET FILE BY TYPE", e.what()); return HandleException("GENERAL ERROR WHEN GET FILE BY TYPE", e.what());
} }
...@@ -470,12 +446,6 @@ Status MySQLMetaImpl::UpdateTableIndex(const std::string &table_id, const TableI ...@@ -470,12 +446,6 @@ Status MySQLMetaImpl::UpdateTableIndex(const std::string &table_id, const TableI
} //Scoped Connection } //Scoped Connection
} catch (const BadQuery &e) {
// Handle any query errors
return HandleException("GENERAL ERROR WHEN UPDATING TABLE INDEX PARAM", e.what());
} catch (const Exception &e) {
// Catch-all for any other MySQL++ exceptions
return HandleException("GENERAL ERROR WHEN UPDATING TABLE INDEX PARAM", e.what());
} catch (std::exception &e) { } catch (std::exception &e) {
return HandleException("GENERAL ERROR WHEN UPDATING TABLE INDEX PARAM", e.what()); return HandleException("GENERAL ERROR WHEN UPDATING TABLE INDEX PARAM", e.what());
} }
...@@ -507,12 +477,6 @@ Status MySQLMetaImpl::UpdateTableFlag(const std::string &table_id, int64_t flag) ...@@ -507,12 +477,6 @@ Status MySQLMetaImpl::UpdateTableFlag(const std::string &table_id, int64_t flag)
} //Scoped Connection } //Scoped Connection
} catch (const BadQuery &e) {
// Handle any query errors
return HandleException("GENERAL ERROR WHEN UPDATING TABLE FLAG", e.what());
} catch (const Exception &e) {
// Catch-all for any other MySQL++ exceptions
return HandleException("GENERAL ERROR WHEN UPDATING TABLE FLAG", e.what());
} catch (std::exception &e) { } catch (std::exception &e) {
return HandleException("GENERAL ERROR WHEN UPDATING TABLE FLAG", e.what()); return HandleException("GENERAL ERROR WHEN UPDATING TABLE FLAG", e.what());
} }
...@@ -553,12 +517,6 @@ Status MySQLMetaImpl::DescribeTableIndex(const std::string &table_id, TableIndex ...@@ -553,12 +517,6 @@ Status MySQLMetaImpl::DescribeTableIndex(const std::string &table_id, TableIndex
} //Scoped Connection } //Scoped Connection
} catch (const BadQuery &e) {
// Handle any query errors
return HandleException("GENERAL ERROR WHEN DESCRIBE TABLE INDEX", e.what());
} catch (const Exception &e) {
// Catch-all for any other MySQL++ exceptions
return HandleException("GENERAL ERROR WHEN DESCRIBE TABLE INDEX", e.what());
} catch (std::exception &e) { } catch (std::exception &e) {
return HandleException("GENERAL ERROR WHEN UPDATING TABLE FLAG", e.what()); return HandleException("GENERAL ERROR WHEN UPDATING TABLE FLAG", e.what());
} }
...@@ -620,12 +578,6 @@ Status MySQLMetaImpl::DropTableIndex(const std::string &table_id) { ...@@ -620,12 +578,6 @@ Status MySQLMetaImpl::DropTableIndex(const std::string &table_id) {
} //Scoped Connection } //Scoped Connection
} catch (const BadQuery &e) {
// Handle any query errors
return HandleException("GENERAL ERROR WHEN DROPPING TABLE INDEX", e.what());
} catch (const Exception &e) {
// Catch-all for any other MySQL++ exceptions
return HandleException("GENERAL ERROR WHEN DROPPING TABLE INDEX", e.what());
} catch (std::exception &e) { } catch (std::exception &e) {
return HandleException("GENERAL ERROR WHEN DROPPING TABLE INDEX", e.what()); return HandleException("GENERAL ERROR WHEN DROPPING TABLE INDEX", e.what());
} }
...@@ -662,12 +614,6 @@ Status MySQLMetaImpl::DeleteTable(const std::string &table_id) { ...@@ -662,12 +614,6 @@ Status MySQLMetaImpl::DeleteTable(const std::string &table_id) {
DeleteTableFiles(table_id); DeleteTableFiles(table_id);
} }
} catch (const BadQuery &e) {
// Handle any query errors
return HandleException("GENERAL ERROR WHEN DELETING TABLE", e.what());
} catch (const Exception &e) {
// Catch-all for any other MySQL++ exceptions
return HandleException("GENERAL ERROR WHEN DELETING TABLE", e.what());
} catch (std::exception &e) { } catch (std::exception &e) {
return HandleException("GENERAL ERROR WHEN DELETING TABLE", e.what()); return HandleException("GENERAL ERROR WHEN DELETING TABLE", e.what());
} }
...@@ -700,12 +646,6 @@ Status MySQLMetaImpl::DeleteTableFiles(const std::string &table_id) { ...@@ -700,12 +646,6 @@ Status MySQLMetaImpl::DeleteTableFiles(const std::string &table_id) {
return HandleException("QUERY ERROR WHEN DELETING TABLE FILES", deleteTableFilesQuery.error()); return HandleException("QUERY ERROR WHEN DELETING TABLE FILES", deleteTableFilesQuery.error());
} }
} //Scoped Connection } //Scoped Connection
} catch (const BadQuery &e) {
// Handle any query errors
return HandleException("GENERAL ERROR WHEN DELETING TABLE FILES", e.what());
} catch (const Exception &e) {
// Catch-all for any other MySQL++ exceptions
return HandleException("GENERAL ERROR WHEN DELETING TABLE FILES", e.what());
} catch (std::exception &e) { } catch (std::exception &e) {
return HandleException("GENERAL ERROR WHEN DELETING TABLE FILES", e.what()); return HandleException("GENERAL ERROR WHEN DELETING TABLE FILES", e.what());
} }
...@@ -760,12 +700,6 @@ Status MySQLMetaImpl::DescribeTable(TableSchema &table_schema) { ...@@ -760,12 +700,6 @@ Status MySQLMetaImpl::DescribeTable(TableSchema &table_schema) {
return Status(DB_NOT_FOUND, "Table " + table_schema.table_id_ + " not found"); return Status(DB_NOT_FOUND, "Table " + table_schema.table_id_ + " not found");
} }
} catch (const BadQuery &e) {
// Handle any query errors
return HandleException("GENERAL ERROR WHEN DESCRIBING TABLE", e.what());
} catch (const Exception &e) {
// Catch-all for any other MySQL++ exceptions
return HandleException("GENERAL ERROR WHEN DESCRIBING TABLE", e.what());
} catch (std::exception &e) { } catch (std::exception &e) {
return HandleException("GENERAL ERROR WHEN DESCRIBING TABLE", e.what()); return HandleException("GENERAL ERROR WHEN DESCRIBING TABLE", e.what());
} }
...@@ -800,12 +734,6 @@ Status MySQLMetaImpl::HasTable(const std::string &table_id, bool &has_or_not) { ...@@ -800,12 +734,6 @@ Status MySQLMetaImpl::HasTable(const std::string &table_id, bool &has_or_not) {
int check = res[0]["check"]; int check = res[0]["check"];
has_or_not = (check == 1); has_or_not = (check == 1);
} catch (const BadQuery &e) {
// Handle any query errors
return HandleException("GENERAL ERROR WHEN CHECKING IF TABLE EXISTS", e.what());
} catch (const Exception &e) {
// Catch-all for any other MySQL++ exceptions
return HandleException("GENERAL ERROR WHEN CHECKING IF TABLE EXISTS", e.what());
} catch (std::exception &e) { } catch (std::exception &e) {
return HandleException("GENERAL ERROR WHEN CHECKING IF TABLE EXISTS", e.what()); return HandleException("GENERAL ERROR WHEN CHECKING IF TABLE EXISTS", e.what());
} }
...@@ -855,12 +783,6 @@ Status MySQLMetaImpl::AllTables(std::vector<TableSchema> &table_schema_array) { ...@@ -855,12 +783,6 @@ Status MySQLMetaImpl::AllTables(std::vector<TableSchema> &table_schema_array) {
table_schema_array.emplace_back(table_schema); table_schema_array.emplace_back(table_schema);
} }
} catch (const BadQuery &e) {
// Handle any query errors
return HandleException("GENERAL ERROR WHEN DESCRIBING ALL TABLES", e.what());
} catch (const Exception &e) {
// Catch-all for any other MySQL++ exceptions
return HandleException("GENERAL ERROR WHEN DESCRIBING ALL TABLES", e.what());
} catch (std::exception &e) { } catch (std::exception &e) {
return HandleException("GENERAL ERROR WHEN DESCRIBING ALL TABLES", e.what()); return HandleException("GENERAL ERROR WHEN DESCRIBING ALL TABLES", e.what());
} }
...@@ -932,12 +854,6 @@ Status MySQLMetaImpl::CreateTableFile(TableFileSchema &file_schema) { ...@@ -932,12 +854,6 @@ Status MySQLMetaImpl::CreateTableFile(TableFileSchema &file_schema) {
return utils::CreateTableFilePath(options_, file_schema); return utils::CreateTableFilePath(options_, file_schema);
} catch (const BadQuery &e) {
// Handle any query errors
return HandleException("GENERAL ERROR WHEN CREATING TABLE FILE", e.what());
} catch (const Exception &e) {
// Catch-all for any other MySQL++ exceptions
return HandleException("GENERAL ERROR WHEN CREATING TABLE FILE", e.what());
} catch (std::exception &e) { } catch (std::exception &e) {
return HandleException("GENERAL ERROR WHEN CREATING TABLE FILE", e.what()); return HandleException("GENERAL ERROR WHEN CREATING TABLE FILE", e.what());
} }
...@@ -1012,12 +928,6 @@ Status MySQLMetaImpl::FilesToIndex(TableFilesSchema &files) { ...@@ -1012,12 +928,6 @@ Status MySQLMetaImpl::FilesToIndex(TableFilesSchema &files) {
files.push_back(table_file); files.push_back(table_file);
} }
} catch (const BadQuery &e) {
// Handle any query errors
return HandleException("GENERAL ERROR WHEN FINDING TABLE FILES TO INDEX", e.what());
} catch (const Exception &e) {
// Catch-all for any other MySQL++ exceptions
return HandleException("GENERAL ERROR WHEN FINDING TABLE FILES TO INDEX", e.what());
} catch (std::exception &e) { } catch (std::exception &e) {
return HandleException("GENERAL ERROR WHEN FINDING TABLE FILES TO INDEX", e.what()); return HandleException("GENERAL ERROR WHEN FINDING TABLE FILES TO INDEX", e.what());
} }
...@@ -1126,12 +1036,6 @@ Status MySQLMetaImpl::FilesToSearch(const std::string &table_id, ...@@ -1126,12 +1036,6 @@ Status MySQLMetaImpl::FilesToSearch(const std::string &table_id,
files[table_file.date_].push_back(table_file); files[table_file.date_].push_back(table_file);
} }
} catch (const BadQuery &e) {
// Handle any query errors
return HandleException("GENERAL ERROR WHEN FINDING TABLE FILES TO SEARCH", e.what());
} catch (const Exception &e) {
// Catch-all for any other MySQL++ exceptions
return HandleException("GENERAL ERROR WHEN FINDING TABLE FILES TO SEARCH", e.what());
} catch (std::exception &e) { } catch (std::exception &e) {
return HandleException("GENERAL ERROR WHEN FINDING TABLE FILES TO SEARCH", e.what()); return HandleException("GENERAL ERROR WHEN FINDING TABLE FILES TO SEARCH", e.what());
} }
...@@ -1219,12 +1123,6 @@ Status MySQLMetaImpl::FilesToMerge(const std::string &table_id, ...@@ -1219,12 +1123,6 @@ Status MySQLMetaImpl::FilesToMerge(const std::string &table_id,
files[table_file.date_].push_back(table_file); files[table_file.date_].push_back(table_file);
} }
} catch (const BadQuery &e) {
// Handle any query errors
return HandleException("GENERAL ERROR WHEN FINDING TABLE FILES TO MERGE", e.what());
} catch (const Exception &e) {
// Catch-all for any other MySQL++ exceptions
return HandleException("GENERAL ERROR WHEN FINDING TABLE FILES TO MERGE", e.what());
} catch (std::exception &e) { } catch (std::exception &e) {
return HandleException("GENERAL ERROR WHEN FINDING TABLE FILES TO MERGE", e.what()); return HandleException("GENERAL ERROR WHEN FINDING TABLE FILES TO MERGE", e.what());
} }
...@@ -1309,12 +1207,6 @@ Status MySQLMetaImpl::GetTableFiles(const std::string &table_id, ...@@ -1309,12 +1207,6 @@ Status MySQLMetaImpl::GetTableFiles(const std::string &table_id,
table_files.emplace_back(file_schema); table_files.emplace_back(file_schema);
} }
} catch (const BadQuery &e) {
// Handle any query errors
return HandleException("GENERAL ERROR WHEN RETRIEVING TABLE FILES", e.what());
} catch (const Exception &e) {
// Catch-all for any other MySQL++ exceptions
return HandleException("GENERAL ERROR WHEN RETRIEVING TABLE FILES", e.what());
} catch (std::exception &e) { } catch (std::exception &e) {
return HandleException("GENERAL ERROR WHEN RETRIEVING TABLE FILES", e.what()); return HandleException("GENERAL ERROR WHEN RETRIEVING TABLE FILES", e.what());
} }
...@@ -1355,12 +1247,6 @@ Status MySQLMetaImpl::Archive() { ...@@ -1355,12 +1247,6 @@ Status MySQLMetaImpl::Archive() {
return HandleException("QUERY ERROR DURING ARCHIVE", archiveQuery.error()); return HandleException("QUERY ERROR DURING ARCHIVE", archiveQuery.error());
} }
} catch (const BadQuery &e) {
// Handle any query errors
return HandleException("GENERAL ERROR WHEN DURING ARCHIVE", e.what());
} catch (const Exception &e) {
// Catch-all for any other MySQL++ exceptions
return HandleException("GENERAL ERROR WHEN DURING ARCHIVE", e.what());
} catch (std::exception &e) { } catch (std::exception &e) {
return HandleException("GENERAL ERROR WHEN DURING ARCHIVE", e.what()); return HandleException("GENERAL ERROR WHEN DURING ARCHIVE", e.what());
} }
...@@ -1405,12 +1291,6 @@ Status MySQLMetaImpl::Size(uint64_t &result) { ...@@ -1405,12 +1291,6 @@ Status MySQLMetaImpl::Size(uint64_t &result) {
result = res[0]["sum"]; result = res[0]["sum"];
} }
} catch (const BadQuery &e) {
// Handle any query errors
return HandleException("GENERAL ERROR WHEN RETRIEVING SIZE", e.what());
} catch (const Exception &e) {
// Catch-all for any other MySQL++ exceptions
return HandleException("GENERAL ERROR WHEN RETRIEVING SIZE", e.what());
} catch (std::exception &e) { } catch (std::exception &e) {
return HandleException("GENERAL ERROR WHEN RETRIEVING SIZE", e.what()); return HandleException("GENERAL ERROR WHEN RETRIEVING SIZE", e.what());
} }
...@@ -1481,12 +1361,6 @@ Status MySQLMetaImpl::DiscardFiles(long long to_discard_size) { ...@@ -1481,12 +1361,6 @@ Status MySQLMetaImpl::DiscardFiles(long long to_discard_size) {
return DiscardFiles(to_discard_size); return DiscardFiles(to_discard_size);
} catch (const BadQuery &e) {
// Handle any query errors
return HandleException("GENERAL ERROR WHEN DISCARDING FILES", e.what());
} catch (const Exception &e) {
// Catch-all for any other MySQL++ exceptions
return HandleException("GENERAL ERROR WHEN DISCARDING FILES", e.what());
} catch (std::exception &e) { } catch (std::exception &e) {
return HandleException("GENERAL ERROR WHEN DISCARDING FILES", e.what()); return HandleException("GENERAL ERROR WHEN DISCARDING FILES", e.what());
} }
...@@ -1556,14 +1430,6 @@ Status MySQLMetaImpl::UpdateTableFile(TableFileSchema &file_schema) { ...@@ -1556,14 +1430,6 @@ Status MySQLMetaImpl::UpdateTableFile(TableFileSchema &file_schema) {
} }
} //Scoped Connection } //Scoped Connection
} catch (const BadQuery &e) {
// Handle any query errors
ENGINE_LOG_DEBUG << "table_id= " << file_schema.table_id_ << " file_id=" << file_schema.file_id_;
return HandleException("GENERAL ERROR WHEN UPDATING TABLE FILE", e.what());
} catch (const Exception &e) {
// Catch-all for any other MySQL++ exceptions
ENGINE_LOG_DEBUG << "table_id= " << file_schema.table_id_ << " file_id=" << file_schema.file_id_;
return HandleException("GENERAL ERROR WHEN UPDATING TABLE FILE", e.what());
} catch (std::exception &e) { } catch (std::exception &e) {
return HandleException("GENERAL ERROR WHEN UPDATING TABLE FILE", e.what()); return HandleException("GENERAL ERROR WHEN UPDATING TABLE FILE", e.what());
} }
...@@ -1592,12 +1458,6 @@ Status MySQLMetaImpl::UpdateTableFilesToIndex(const std::string &table_id) { ...@@ -1592,12 +1458,6 @@ Status MySQLMetaImpl::UpdateTableFilesToIndex(const std::string &table_id) {
return HandleException("QUERY ERROR WHEN UPDATING TABLE FILE TO INDEX", updateTableFilesToIndexQuery.error()); return HandleException("QUERY ERROR WHEN UPDATING TABLE FILE TO INDEX", updateTableFilesToIndexQuery.error());
} }
} catch (const BadQuery &e) {
// Handle any query errors
return HandleException("GENERAL ERROR WHEN UPDATING TABLE FILES TO INDEX", e.what());
} catch (const Exception &e) {
// Catch-all for any other MySQL++ exceptions
return HandleException("GENERAL ERROR WHEN UPDATING TABLE FILES TO INDEX", e.what());
} catch (std::exception &e) { } catch (std::exception &e) {
return HandleException("GENERAL ERROR WHEN UPDATING TABLE FILES TO INDEX", e.what()); return HandleException("GENERAL ERROR WHEN UPDATING TABLE FILES TO INDEX", e.what());
} }
...@@ -1676,12 +1536,6 @@ Status MySQLMetaImpl::UpdateTableFiles(TableFilesSchema &files) { ...@@ -1676,12 +1536,6 @@ Status MySQLMetaImpl::UpdateTableFiles(TableFilesSchema &files) {
} }
} //Scoped Connection } //Scoped Connection
} catch (const BadQuery &e) {
// Handle any query errors
return HandleException("GENERAL ERROR WHEN UPDATING TABLE FILES", e.what());
} catch (const Exception &e) {
// Catch-all for any other MySQL++ exceptions
return HandleException("GENERAL ERROR WHEN UPDATING TABLE FILES", e.what());
} catch (std::exception &e) { } catch (std::exception &e) {
return HandleException("GENERAL ERROR WHEN UPDATING TABLE FILES", e.what()); return HandleException("GENERAL ERROR WHEN UPDATING TABLE FILES", e.what());
} }
...@@ -1760,12 +1614,6 @@ Status MySQLMetaImpl::CleanUpFilesWithTTL(uint16_t seconds) { ...@@ -1760,12 +1614,6 @@ Status MySQLMetaImpl::CleanUpFilesWithTTL(uint16_t seconds) {
} }
} //Scoped Connection } //Scoped Connection
} catch (const BadQuery &e) {
// Handle any query errors
return HandleException("GENERAL ERROR WHEN CLEANING UP FILES WITH TTL", e.what());
} catch (const Exception &e) {
// Catch-all for any other MySQL++ exceptions
return HandleException("GENERAL ERROR WHEN CLEANING UP FILES WITH TTL", e.what());
} catch (std::exception &e) { } catch (std::exception &e) {
return HandleException("GENERAL ERROR WHEN CLEANING UP FILES WITH TTL", e.what()); return HandleException("GENERAL ERROR WHEN CLEANING UP FILES WITH TTL", e.what());
} }
...@@ -1815,12 +1663,6 @@ Status MySQLMetaImpl::CleanUpFilesWithTTL(uint16_t seconds) { ...@@ -1815,12 +1663,6 @@ Status MySQLMetaImpl::CleanUpFilesWithTTL(uint16_t seconds) {
} }
} //Scoped Connection } //Scoped Connection
} catch (const BadQuery &e) {
// Handle any query errors
return HandleException("GENERAL ERROR WHEN CLEANING UP TABLES WITH TTL", e.what());
} catch (const Exception &e) {
// Catch-all for any other MySQL++ exceptions
return HandleException("GENERAL ERROR WHEN CLEANING UP TABLES WITH TTL", e.what());
} catch (std::exception &e) { } catch (std::exception &e) {
return HandleException("GENERAL ERROR WHEN CLEANING UP TABLES WITH TTL", e.what()); return HandleException("GENERAL ERROR WHEN CLEANING UP TABLES WITH TTL", e.what());
} }
...@@ -1852,12 +1694,6 @@ Status MySQLMetaImpl::CleanUpFilesWithTTL(uint16_t seconds) { ...@@ -1852,12 +1694,6 @@ Status MySQLMetaImpl::CleanUpFilesWithTTL(uint16_t seconds) {
} }
} }
} }
} catch (const BadQuery &e) {
// Handle any query errors
return HandleException("GENERAL ERROR WHEN CLEANING UP TABLES WITH TTL", e.what());
} catch (const Exception &e) {
// Catch-all for any other MySQL++ exceptions
return HandleException("GENERAL ERROR WHEN CLEANING UP TABLES WITH TTL", e.what());
} catch (std::exception &e) { } catch (std::exception &e) {
return HandleException("GENERAL ERROR WHEN CLEANING UP TABLES WITH TTL", e.what()); return HandleException("GENERAL ERROR WHEN CLEANING UP TABLES WITH TTL", e.what());
} }
...@@ -1897,12 +1733,6 @@ Status MySQLMetaImpl::CleanUp() { ...@@ -1897,12 +1733,6 @@ Status MySQLMetaImpl::CleanUp() {
} }
} }
} catch (const BadQuery &e) {
// Handle any query errors
return HandleException("GENERAL ERROR WHEN CLEANING UP FILES", e.what());
} catch (const Exception &e) {
// Catch-all for any other MySQL++ exceptions
return HandleException("GENERAL ERROR WHEN CLEANING UP FILES", e.what());
} catch (std::exception &e) { } catch (std::exception &e) {
return HandleException("GENERAL ERROR WHEN CLEANING UP FILES", e.what()); return HandleException("GENERAL ERROR WHEN CLEANING UP FILES", e.what());
} }
...@@ -1950,12 +1780,6 @@ Status MySQLMetaImpl::Count(const std::string &table_id, uint64_t &result) { ...@@ -1950,12 +1780,6 @@ Status MySQLMetaImpl::Count(const std::string &table_id, uint64_t &result) {
result += size; result += size;
} }
} catch (const BadQuery &e) {
// Handle any query errors
return HandleException("GENERAL ERROR WHEN RETRIEVING COUNT", e.what());
} catch (const Exception &e) {
// Catch-all for any other MySQL++ exceptions
return HandleException("GENERAL ERROR WHEN RETRIEVING COUNT", e.what());
} catch (std::exception &e) { } catch (std::exception &e) {
return HandleException("GENERAL ERROR WHEN RETRIEVING COUNT", e.what()); return HandleException("GENERAL ERROR WHEN RETRIEVING COUNT", e.what());
} }
...@@ -1982,12 +1806,6 @@ Status MySQLMetaImpl::DropAll() { ...@@ -1982,12 +1806,6 @@ Status MySQLMetaImpl::DropAll() {
} else { } else {
return HandleException("QUERY ERROR WHEN DROPPING ALL", dropTableQuery.error()); return HandleException("QUERY ERROR WHEN DROPPING ALL", dropTableQuery.error());
} }
} catch (const BadQuery &e) {
// Handle any query errors
return HandleException("GENERAL ERROR WHEN DROPPING ALL", e.what());
} catch (const Exception &e) {
// Catch-all for any other MySQL++ exceptions
return HandleException("GENERAL ERROR WHEN DROPPING ALL", e.what());
} catch (std::exception &e) { } catch (std::exception &e) {
return HandleException("GENERAL ERROR WHEN DROPPING ALL", e.what()); return HandleException("GENERAL ERROR WHEN DROPPING ALL", e.what());
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册