fix(clickhousech@m-5285220418): [cp cnch-2.2] minor fix coredump of SystemLog

See merge request: !25244
This commit is contained in:
fredwang 2024-10-09 02:35:07 +00:00 committed by Fred Wang
parent a189add9c6
commit 41fac7b825
2 changed files with 8 additions and 2 deletions

View File

@ -199,6 +199,12 @@ public:
const String & storage_def_,
size_t flush_interval_milliseconds_);
/// destructor is necessary to stop flush thread before deleting member variable `saving_thread`
~SystemLog() override
{
shutdown();
}
/** Append a record into log.
* Writing to table will be done asynchronously and in case of failure, record could be lost.
*/

View File

@ -1526,8 +1526,8 @@ String ColumnPruningVisitor::selectColumnWithMinSize(NamesAndTypesList source_co
}
// tmp fix for 40113_lowcard_nullable_subcolumn
auto metadata_snapshot = storage->getInMemoryMetadata();
const auto & columns_desc = metadata_snapshot.getColumns();
auto metadata_snapshot = storage->getInMemoryMetadataPtr();
const auto & columns_desc = metadata_snapshot->getColumns();
source_columns.erase(
std::remove_if(
source_columns.begin(),