Skip to content

Commit

Permalink
Merge pull request ClickHouse#51911 from ClickHouse/revert-51910-fix-…
Browse files Browse the repository at this point in the history
…build-5

Revert "Fix build"
  • Loading branch information
alexey-milovidov committed Jul 6, 2023
2 parents e8d28e4 + 685f294 commit fa9514f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/Coordination/KeeperContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ KeeperContext::Storage KeeperContext::getLogsPathFromConfig(const Poco::Util::Ab
if (!fs::exists(path))
fs::create_directories(path);

return std::make_shared<DiskLocal>("LocalLogDisk", path, 0);
return std::make_shared<DiskLocal>("LocalLogDisk", path);
};

/// the most specialized path
Expand All @@ -246,7 +246,7 @@ KeeperContext::Storage KeeperContext::getSnapshotsPathFromConfig(const Poco::Uti
if (!fs::exists(path))
fs::create_directories(path);

return std::make_shared<DiskLocal>("LocalSnapshotDisk", path, 0);
return std::make_shared<DiskLocal>("LocalSnapshotDisk", path);
};

/// the most specialized path
Expand All @@ -272,7 +272,7 @@ KeeperContext::Storage KeeperContext::getStatePathFromConfig(const Poco::Util::A
if (!fs::exists(path))
fs::create_directories(path);

return std::make_shared<DiskLocal>("LocalStateFileDisk", path, 0);
return std::make_shared<DiskLocal>("LocalStateFileDisk", path);
};

if (config.has("keeper_server.state_storage_disk"))
Expand Down
10 changes: 5 additions & 5 deletions src/Coordination/tests/gtest_coordination.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,16 @@ class CoordinationTest : public ::testing::TestWithParam<CompressionParam>
DB::KeeperContextPtr keeper_context = std::make_shared<DB::KeeperContext>(true);
Poco::Logger * log{&Poco::Logger::get("CoordinationTest")};

void setLogDirectory(const std::string & path) { keeper_context->setLogDisk(std::make_shared<DB::DiskLocal>("LogDisk", path, 0)); }
void setLogDirectory(const std::string & path) { keeper_context->setLogDisk(std::make_shared<DB::DiskLocal>("LogDisk", path)); }

void setSnapshotDirectory(const std::string & path)
{
keeper_context->setSnapshotDisk(std::make_shared<DB::DiskLocal>("SnapshotDisk", path, 0));
keeper_context->setSnapshotDisk(std::make_shared<DB::DiskLocal>("SnapshotDisk", path));
}

void setStateFileDirectory(const std::string & path)
{
keeper_context->setStateFileDisk(std::make_shared<DB::DiskLocal>("StateFile", path, 0));
keeper_context->setStateFileDisk(std::make_shared<DB::DiskLocal>("StateFile", path));
}
};

Expand Down Expand Up @@ -1503,9 +1503,9 @@ void testLogAndStateMachine(
using namespace DB;

ChangelogDirTest snapshots("./snapshots");
keeper_context->setSnapshotDisk(std::make_shared<DiskLocal>("SnapshotDisk", "./snapshots", 0));
keeper_context->setSnapshotDisk(std::make_shared<DiskLocal>("SnapshotDisk", "./snapshots"));
ChangelogDirTest logs("./logs");
keeper_context->setLogDisk(std::make_shared<DiskLocal>("LogDisk", "./logs", 0));
keeper_context->setLogDisk(std::make_shared<DiskLocal>("LogDisk", "./logs"));

ResponsesQueue queue(std::numeric_limits<size_t>::max());
SnapshotsQueue snapshots_queue{1};
Expand Down
4 changes: 2 additions & 2 deletions utils/keeper-data-dumper/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ int main(int argc, char *argv[])
SnapshotsQueue snapshots_queue{1};
CoordinationSettingsPtr settings = std::make_shared<CoordinationSettings>();
KeeperContextPtr keeper_context = std::make_shared<DB::KeeperContext>(true);
keeper_context->setLogDisk(std::make_shared<DB::DiskLocal>("LogDisk", argv[2], 0));
keeper_context->setSnapshotDisk(std::make_shared<DB::DiskLocal>("LogDisk", argv[1], 0));
keeper_context->setLogDisk(std::make_shared<DB::DiskLocal>("LogDisk", argv[2]));
keeper_context->setSnapshotDisk(std::make_shared<DB::DiskLocal>("LogDisk", argv[1]));

auto state_machine = std::make_shared<KeeperStateMachine>(queue, snapshots_queue, settings, keeper_context, nullptr);
state_machine->init();
Expand Down

0 comments on commit fa9514f

Please sign in to comment.