Skip to content

Commit

Permalink
fix keeper build
Browse files Browse the repository at this point in the history
  • Loading branch information
serxa committed Sep 10, 2023
1 parent 1b3da7f commit d326554
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
10 changes: 10 additions & 0 deletions src/Coordination/Standalone/Context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,16 @@ ReadSettings Context::getReadSettings() const
return ReadSettings{};
}

ResourceManagerPtr Context::getResourceManager() const
{
return nullptr;
}

ClassifierPtr Context::getWorkloadClassifier() const
{
return nullptr;
}

void Context::initializeKeeperDispatcher([[maybe_unused]] bool start_async) const
{
const auto & config_ref = getConfigRef();
Expand Down
4 changes: 4 additions & 0 deletions src/Coordination/Standalone/Context.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ class Context : public std::enable_shared_from_this<Context>

ReadSettings getReadSettings() const;

/// Resource management related
ResourceManagerPtr getResourceManager() const;
ClassifierPtr getWorkloadClassifier() const;

std::shared_ptr<KeeperDispatcher> getKeeperDispatcher() const;
std::shared_ptr<KeeperDispatcher> tryGetKeeperDispatcher() const;
void initializeKeeperDispatcher(bool start_async) const;
Expand Down
2 changes: 1 addition & 1 deletion src/Disks/ObjectStorages/DiskObjectStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ static inline Settings updateResourceLink(const Settings & settings, const Strin
if (auto query_context = CurrentThread::getQueryContext())
{
Settings result(settings);
result.resource_link = query_context->getClassifier()->get(resource_name);
result.resource_link = query_context->getWorkloadClassifier()->get(resource_name);
return result;
}
return settings;
Expand Down
2 changes: 1 addition & 1 deletion src/Interpreters/Context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1294,7 +1294,7 @@ ResourceManagerPtr Context::getResourceManager() const
return shared->resource_manager;
}

ClassifierPtr Context::getClassifier() const
ClassifierPtr Context::getWorkloadClassifier() const
{
auto lock = getLock();
if (!classifier)
Expand Down
2 changes: 1 addition & 1 deletion src/Interpreters/Context.h
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ class Context: public std::enable_shared_from_this<Context>

/// Resource management related
ResourceManagerPtr getResourceManager() const;
ClassifierPtr getClassifier() const;
ClassifierPtr getWorkloadClassifier() const;

/// We have to copy external tables inside executeQuery() to track limits. Therefore, set callback for it. Must set once.
void setExternalTablesInitializer(ExternalTablesInitializer && initializer);
Expand Down

0 comments on commit d326554

Please sign in to comment.