diff --git a/src/Storages/MergeTree/IMergeTreeReader.cpp b/src/Storages/MergeTree/IMergeTreeReader.cpp index dc9e9001439..be9aedaf4d5 100644 --- a/src/Storages/MergeTree/IMergeTreeReader.cpp +++ b/src/Storages/MergeTree/IMergeTreeReader.cpp @@ -79,7 +79,11 @@ void IMergeTreeReader::fillMissingColumns(Columns & res_columns, bool & should_e catch (Exception & e) { /// Better diagnostics. - e.addMessage("(while reading from part " + data_part_info_for_read->getDataPartStorage()->getFullPath() + ")"); + const auto & part_storage = data_part_info_for_read->getDataPartStorage(); + e.addMessage( + "(while reading from part " + part_storage->getFullPath() + + " located on disk " + part_storage->getDiskName() + + " of type " + part_storage->getDiskType() + ")"); throw; } } @@ -124,7 +128,11 @@ void IMergeTreeReader::evaluateMissingDefaults(Block additional_columns, Columns catch (Exception & e) { /// Better diagnostics. - e.addMessage("(while reading from part " + data_part_info_for_read->getDataPartStorage()->getFullPath() + ")"); + const auto & part_storage = data_part_info_for_read->getDataPartStorage(); + e.addMessage( + "(while reading from part " + part_storage->getFullPath() + + " located on disk " + part_storage->getDiskName() + + " of type " + part_storage->getDiskType() + ")"); throw; } } @@ -199,7 +207,11 @@ void IMergeTreeReader::performRequiredConversions(Columns & res_columns) const catch (Exception & e) { /// Better diagnostics. - e.addMessage("(while reading from part " + data_part_info_for_read->getDataPartStorage()->getFullPath() + ")"); + const auto & part_storage = data_part_info_for_read->getDataPartStorage(); + e.addMessage( + "(while reading from part " + part_storage->getFullPath() + + " located on disk " + part_storage->getDiskName() + + " of type " + part_storage->getDiskType() + ")"); throw; } } diff --git a/src/Storages/MergeTree/MergeTreeReaderWide.cpp b/src/Storages/MergeTree/MergeTreeReaderWide.cpp index baacfa55c94..38032fae826 100644 --- a/src/Storages/MergeTree/MergeTreeReaderWide.cpp +++ b/src/Storages/MergeTree/MergeTreeReaderWide.cpp @@ -188,10 +188,11 @@ size_t MergeTreeReaderWide::readRows( data_part_info_for_read->reportBroken(); /// Better diagnostics. + const auto & part_storage = data_part_info_for_read->getDataPartStorage(); e.addMessage( fmt::format( - "(while reading from part {} from mark {} with max_rows_to_read = {})", - data_part_info_for_read->getDataPartStorage()->getFullPath(), + "(while reading from part {} located on disk {} of type {}, from mark {} with max_rows_to_read = {})", + part_storage->getFullPath(), part_storage->getDiskName(), part_storage->getDiskType(), toString(from_mark), toString(max_rows_to_read))); throw; }