mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-24 18:50:49 +00:00
add diagnostic information when two merge tables try to read each other's data
This commit is contained in:
parent
dd8362a5eb
commit
e07374331a
@ -430,7 +430,15 @@ StorageMerge::StorageListWithLocks StorageMerge::getSelectedTables(
|
||||
|
||||
DatabaseTablesIteratorPtr StorageMerge::getDatabaseIterator(const Context & context) const
|
||||
{
|
||||
checkStackSize();
|
||||
try
|
||||
{
|
||||
checkStackSize();
|
||||
}
|
||||
catch (Exception & e)
|
||||
{
|
||||
e.addMessage("while getting table iterator of Merge table. Maybe caused by two Merge tables that will endlessly try to read each other's data");
|
||||
throw;
|
||||
}
|
||||
auto database = DatabaseCatalog::instance().getDatabase(source_database);
|
||||
auto table_name_match = [this](const String & table_name_) { return table_name_regexp.match(table_name_); };
|
||||
return database->getTablesIterator(context, table_name_match);
|
||||
|
Loading…
Reference in New Issue
Block a user