@@ -637,16 +637,16 @@ bool MergeTask::ExecuteAndFinalizeHorizontalPart::generateRowIdsMap()
637
637
638
638
// / inverted_row_ids_map file write buffer
639
639
global_ctx->inverted_row_ids_map_uncompressed_buf = global_ctx->new_data_part ->getDataPartStorage ().writeFile (
640
- global_ctx->inverted_row_ids_map_file_path , 4096 , global_ctx->context ->getWriteSettings ());
640
+ fileName ( global_ctx->inverted_row_ids_map_file_path ) , 4096 , WriteMode::Rewrite , global_ctx->context ->getWriteSettings ());
641
641
global_ctx->inverted_row_ids_map_buf = std::make_unique<CompressedWriteBuffer>(*global_ctx->inverted_row_ids_map_uncompressed_buf );
642
642
643
643
// / row_ids_map file write buffers
644
644
global_ctx->row_ids_map_bufs .clear ();
645
645
global_ctx->row_ids_map_uncompressed_bufs .clear ();
646
646
for (const auto & row_ids_map_file : global_ctx->row_ids_map_files )
647
647
{
648
- auto row_ids_map_uncompressed_buf
649
- = global_ctx-> new_data_part -> getDataPartStorage (). writeFile ( row_ids_map_file, 4096 , global_ctx->context ->getWriteSettings ());
648
+ auto row_ids_map_uncompressed_buf = global_ctx-> new_data_part -> getDataPartStorage (). writeFile (
649
+ fileName ( row_ids_map_file) , 4096 , global_ctx->context ->getWriteSettings ());
650
650
global_ctx->row_ids_map_bufs .emplace_back (std::make_unique<CompressedWriteBuffer>(*row_ids_map_uncompressed_buf));
651
651
global_ctx->row_ids_map_uncompressed_bufs .emplace_back (std::move (row_ids_map_uncompressed_buf));
652
652
}
@@ -823,7 +823,6 @@ bool MergeTask::ExecuteAndFinalizeHorizontalPart::generateRowIdsMap()
823
823
824
824
global_ctx->inverted_row_ids_map_buf .reset ();
825
825
global_ctx->inverted_row_ids_map_uncompressed_buf .reset ();
826
-
827
826
throw ;
828
827
}
829
828
@@ -1171,7 +1170,7 @@ bool MergeTask::MergeProjectionsStage::finalizeProjectionsAndWholeMerge() const
1171
1170
String inverted_row_sources_file_path
1172
1171
= global_ctx->new_data_part ->getDataPartStorage ().getFullPath () + " merged-inverted_row_sources_map" + VECTOR_INDEX_FILE_SUFFIX;
1173
1172
auto inverted_row_sources_map_uncompressed_buf = global_ctx->new_data_part ->getDataPartStorage ().writeFile (
1174
- inverted_row_sources_file_path, 4096 , global_ctx->context ->getWriteSettings ());
1173
+ fileName ( inverted_row_sources_file_path) , 4096 , global_ctx->context ->getWriteSettings ());
1175
1174
auto inverted_row_sources_map_buf = std::make_unique<CompressedWriteBuffer>(*inverted_row_sources_map_uncompressed_buf);
1176
1175
1177
1176
DB::copyData (*rows_sources_read_buf, *inverted_row_sources_map_buf);
@@ -1180,7 +1179,7 @@ bool MergeTask::MergeProjectionsStage::finalizeProjectionsAndWholeMerge() const
1180
1179
inverted_row_sources_map_uncompressed_buf->finalize ();
1181
1180
1182
1181
// / Previously we marked this tmp file to be kept
1183
- global_ctx->context ->getTemporaryVolume ()->getDisk ()->removeFile (global_ctx->inverted_row_sources_map_file_path );
1182
+ global_ctx->context ->getTemporaryVolume ()->getDisk ()->removeFile (fileName ( global_ctx->inverted_row_sources_map_file_path ) );
1184
1183
1185
1184
// / add merged-inverted_row_ids_map and merged-inverted_row_sources_map to vector_index_checksums_map
1186
1185
NameSet index_map_filenames
0 commit comments