diff --git a/dbms/src/Storages/MergeTree/MergeTreeData.cpp b/dbms/src/Storages/MergeTree/MergeTreeData.cpp index b99ac827d1f..8a5aae72925 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeData.cpp +++ b/dbms/src/Storages/MergeTree/MergeTreeData.cpp @@ -2227,11 +2227,6 @@ MergeTreeData::DataPartsVector MergeTreeData::getDataPartsVector(const DataPartS (*out_states)[i] = res[i]->state; } } - std::cerr << "NOT INITIALIZED DATA PART\n"; - for (auto part : res) { - std::cerr << "FullPath:" << part->getFullPath() << std::endl; - std::cerr << "MarkSFileExtensSion:" << part->marks_file_extension << std::endl; - } return res; } diff --git a/dbms/src/Storages/MergeTree/MergeTreeReader.cpp b/dbms/src/Storages/MergeTree/MergeTreeReader.cpp index df46d25bef8..0dd21612090 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeReader.cpp +++ b/dbms/src/Storages/MergeTree/MergeTreeReader.cpp @@ -273,6 +273,8 @@ void MergeTreeReader::Stream::loadMarks() size_t file_size = Poco::File(path).getSize(); size_t expected_file_size = one_mark_bytes_size * marks_count; + std::cerr << "Marks size in bytes:" << one_mark_bytes_size << std::endl; + std::cerr << "Makrs count:" << marks_count << std::endl; if (expected_file_size != file_size) throw Exception( "bad size of marks file `" + path + "':" + std::to_string(file_size) + ", must be: " + std::to_string(expected_file_size), diff --git a/dbms/src/Storages/MergeTree/MergedBlockOutputStream.cpp b/dbms/src/Storages/MergeTree/MergedBlockOutputStream.cpp index 0185b78b7ca..7d51cf3895c 100644 --- a/dbms/src/Storages/MergeTree/MergedBlockOutputStream.cpp +++ b/dbms/src/Storages/MergeTree/MergedBlockOutputStream.cpp @@ -39,12 +39,14 @@ IMergedBlockOutputStream::IMergedBlockOutputStream( , max_compress_block_size(max_compress_block_size_) , aio_threshold(aio_threshold_) , compression_settings(compression_settings_) - , index_granularity(index_granularity_) , marks_file_extension(storage.index_granularity_bytes == 0 ? FIXED_MARKS_FILE_EXTENSION : ADAPTIVE_MARKS_FILE_EXTENSION) , mark_size_in_bytes(storage.index_granularity_bytes == 0 ? FIXED_MARK_BYTE_SIZE : ADAPTIVE_MARK_BYTE_SIZE) , blocks_are_granules_size(blocks_are_granules_size_) + , index_granularity(index_granularity_) , compute_granularity(index_granularity.empty()) { + if (blocks_are_granules_size && !index_granularity.empty()) + throw Exception("Can't take information about index granularity from blocks, when non empty index_granularity specified", ErrorCodes::LOGICAL_ERROR); }