mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
Rename Context::getTemporaryVolume to getGlobalTemporaryVolume
This commit is contained in:
parent
bae1286b63
commit
01ce3baf0f
@ -748,7 +748,7 @@ Strings Context::getWarnings() const
|
||||
}
|
||||
|
||||
/// TODO: remove, use `getTempDataOnDisk`
|
||||
VolumePtr Context::getTemporaryVolume() const
|
||||
VolumePtr Context::getGlobalTemporaryVolume() const
|
||||
{
|
||||
auto lock = getLock();
|
||||
/// Calling this method we just bypass the `temp_data_on_disk` and write to the file on the volume directly.
|
||||
|
@ -476,7 +476,7 @@ public:
|
||||
/// A list of warnings about server configuration to place in `system.warnings` table.
|
||||
Strings getWarnings() const;
|
||||
|
||||
VolumePtr getTemporaryVolume() const; /// TODO: remove, use `getTempDataOnDisk`
|
||||
VolumePtr getGlobalTemporaryVolume() const; /// TODO: remove, use `getTempDataOnDisk`
|
||||
|
||||
TemporaryDataOnDiskScopePtr getTempDataOnDisk() const;
|
||||
TemporaryDataOnDiskScopePtr getSharedTempDataOnDisk() const;
|
||||
|
@ -308,7 +308,7 @@ std::shared_ptr<TableJoin> JoinedTables::makeTableJoin(const ASTSelectQuery & se
|
||||
|
||||
auto settings = context->getSettingsRef();
|
||||
MultiEnum<JoinAlgorithm> join_algorithm = settings.join_algorithm;
|
||||
auto table_join = std::make_shared<TableJoin>(settings, context->getTemporaryVolume());
|
||||
auto table_join = std::make_shared<TableJoin>(settings, context->getGlobalTemporaryVolume());
|
||||
|
||||
const ASTTablesInSelectQueryElement * ast_join = select_query.join();
|
||||
const auto & table_to_join = ast_join->table_expression->as<ASTTableExpression &>();
|
||||
|
@ -1045,7 +1045,7 @@ std::shared_ptr<Block> MergeJoin::loadRightBlock(size_t pos) const
|
||||
|
||||
void MergeJoin::initRightTableWriter()
|
||||
{
|
||||
disk_writer = std::make_unique<SortedBlocksWriter>(size_limits, table_join->getTemporaryVolume(),
|
||||
disk_writer = std::make_unique<SortedBlocksWriter>(size_limits, table_join->getGlobalTemporaryVolume(),
|
||||
right_sample_block, right_sort_description, max_rows_in_right_block, max_files_to_merge,
|
||||
table_join->temporaryFilesCodec());
|
||||
disk_writer->addBlocks(right_blocks);
|
||||
|
@ -209,7 +209,7 @@ public:
|
||||
JoinStrictness strictness() const { return table_join.strictness; }
|
||||
bool sameStrictnessAndKind(JoinStrictness, JoinKind) const;
|
||||
const SizeLimits & sizeLimits() const { return size_limits; }
|
||||
VolumePtr getTemporaryVolume() { return tmp_volume; }
|
||||
VolumePtr getGlobalTemporaryVolume() { return tmp_volume; }
|
||||
|
||||
bool isEnabledAlgorithm(JoinAlgorithm val) const
|
||||
{
|
||||
|
@ -994,7 +994,7 @@ JoinTreeQueryPlan buildQueryPlanForJoinNode(const QueryTreeNodePtr & join_table_
|
||||
}
|
||||
}
|
||||
|
||||
auto table_join = std::make_shared<TableJoin>(settings, query_context->getTemporaryVolume());
|
||||
auto table_join = std::make_shared<TableJoin>(settings, query_context->getGlobalTemporaryVolume());
|
||||
table_join->getTableJoin() = join_node.toASTTableJoin()->as<ASTTableJoin &>();
|
||||
table_join->getTableJoin().kind = join_kind;
|
||||
|
||||
|
@ -623,7 +623,7 @@ void HTTPHandler::processQuery(
|
||||
|
||||
if (buffer_until_eof)
|
||||
{
|
||||
const std::string tmp_path(server.context()->getTemporaryVolume()->getDisk()->getPath());
|
||||
const std::string tmp_path(server.context()->getGlobalTemporaryVolume()->getDisk()->getPath());
|
||||
const std::string tmp_path_template(fs::path(tmp_path) / "http_buffers/");
|
||||
|
||||
auto create_tmp_disk_buffer = [tmp_path_template] (const WriteBufferPtr &)
|
||||
|
@ -273,7 +273,7 @@ bool MergeTask::ExecuteAndFinalizeHorizontalPart::prepare()
|
||||
ctx->compression_codec = global_ctx->data->getCompressionCodecForPart(
|
||||
global_ctx->merge_list_element_ptr->total_size_bytes_compressed, global_ctx->new_data_part->ttl_infos, global_ctx->time_of_merge);
|
||||
|
||||
ctx->tmp_disk = global_ctx->context->getTemporaryVolume()->getDisk();
|
||||
ctx->tmp_disk = global_ctx->context->getGlobalTemporaryVolume()->getDisk();
|
||||
|
||||
switch (global_ctx->chosen_merge_algorithm)
|
||||
{
|
||||
|
@ -401,7 +401,7 @@ namespace
|
||||
|
||||
void StorageMemory::backupData(BackupEntriesCollector & backup_entries_collector, const String & data_path_in_backup, const std::optional<ASTs> & /* partitions */)
|
||||
{
|
||||
auto temp_disk = backup_entries_collector.getContext()->getTemporaryVolume()->getDisk(0);
|
||||
auto temp_disk = backup_entries_collector.getContext()->getGlobalTemporaryVolume()->getDisk(0);
|
||||
auto max_compress_block_size = backup_entries_collector.getContext()->getSettingsRef().max_compress_block_size;
|
||||
backup_entries_collector.addBackupEntries(
|
||||
std::make_shared<MemoryBackup>(getInMemoryMetadataPtr(), data.get(), data_path_in_backup, temp_disk, max_compress_block_size)
|
||||
@ -417,7 +417,7 @@ void StorageMemory::restoreDataFromBackup(RestorerFromBackup & restorer, const S
|
||||
if (!restorer.isNonEmptyTableAllowed() && total_size_bytes)
|
||||
RestorerFromBackup::throwTableIsNotEmpty(getStorageID());
|
||||
|
||||
auto temp_disk = restorer.getContext()->getTemporaryVolume()->getDisk(0);
|
||||
auto temp_disk = restorer.getContext()->getGlobalTemporaryVolume()->getDisk(0);
|
||||
|
||||
restorer.addDataRestoreTask(
|
||||
[storage = std::static_pointer_cast<StorageMemory>(shared_from_this()), backup, data_path_in_backup, temp_disk]
|
||||
|
Loading…
Reference in New Issue
Block a user