Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,5 @@ message TControlPlaneStorageConfig {
bool DumpRawStatistics = 32;
bool IgnorePrivateSources = 33;
Ydb.Query.StatsMode StatsMode = 34;
repeated string AvailableStreamingConnection = 35;
}
4 changes: 4 additions & 0 deletions ydb/core/fq/libs/control_plane_storage/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ TControlPlaneStorageConfig::TControlPlaneStorageConfig(const NConfig::TControlPl
AvailableBindings.insert(GetBindingType(availableBinding));
}

for (const auto& availableConnection : Proto.GetAvailableStreamingConnection()) {
AvailableStreamingConnections.insert(GetConnectionType(availableConnection));
}

GeneratorPathsLimit =
s3Config.HasGeneratorPathsLimit() ? s3Config.GetGeneratorPathsLimit() : 50'000;

Expand Down
1 change: 1 addition & 0 deletions ydb/core/fq/libs/control_plane_storage/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ struct TControlPlaneStorageConfig {
TRetryPolicyItem TaskLeaseRetryPolicy;
TDuration QuotaTtl;
TDuration MetricsTtl;
TSet<FederatedQuery::ConnectionSetting::ConnectionCase> AvailableStreamingConnections;

TControlPlaneStorageConfig(const NConfig::TControlPlaneStorageConfig& config, const NYql::TS3GatewayConfig& s3Config, const NConfig::TCommonConfig& common, const NConfig::TComputeConfig& computeConfigProto);
};
Expand Down
5 changes: 5 additions & 0 deletions ydb/core/fq/libs/control_plane_storage/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ NConfig::TControlPlaneStorageConfig FillDefaultParameters(NConfig::TControlPlane
config.SetResultSetsTtl("1d");
}

if (config.AvailableStreamingConnectionSize() == 0) {
// For backward compatibility, TODO: YQ-2628, remove after config update on every cluster
config.MutableAvailableStreamingConnection()->CopyFrom(config.GetAvailableConnection());
}

return config;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,12 @@ void TYdbControlPlaneStorageActor::Handle(TEvControlPlaneStorage::TEvCreateQuery
*queryInternal.mutable_compute_connection() = computeDatabase.connection();
TSet<TString> disabledConnections;
for (const auto& connection: GetEntities<FederatedQuery::Connection>(resultSets[resultSets.size() - 2], CONNECTION_COLUMN_NAME, Config->Proto.GetIgnorePrivateSources(), commonCounters)) {
if (!Config->AvailableConnections.contains(connection.content().setting().connection_case())) {
auto connectionCase = connection.content().setting().connection_case();
if (!Config->AvailableConnections.contains(connectionCase)) {
disabledConnections.insert(connection.meta().id());
continue;
}
if ((queryType == FederatedQuery::QueryContent::STREAMING) && !Config->AvailableStreamingConnections.contains(connectionCase)) {
disabledConnections.insert(connection.meta().id());
continue;
}
Expand Down