Skip to content

Commit

Permalink
Extend DisabledOnSchemeShard FF for column tables on dedicated bases … (
Browse files Browse the repository at this point in the history
  • Loading branch information
zverevgeny authored Jul 23, 2024
1 parent 6dbec9f commit bf5f3d7
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 deletions.
4 changes: 3 additions & 1 deletion ydb/core/tx/schemeshard/olap/manager/manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ class TTablesStorage {
TTableCreatedGuard BuildNew(const TPathId& id, TColumnTableInfo::TPtr object);
TTableExtractedGuard TakeVerified(const TPathId& id);
TTableExtractedGuard TakeAlterVerified(const TPathId& id);

bool empty() const {
return Tables.empty();
}
bool contains(const TPathId& id) const {
return Tables.contains(id);
}
Expand Down
10 changes: 4 additions & 6 deletions ydb/core/tx/schemeshard/olap/operations/create_store.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,12 +327,10 @@ class TCreateOlapStore: public TSubOperation {
TEvSchemeShard::EStatus status = NKikimrScheme::StatusAccepted;
auto result = MakeHolder<TProposeResponse>(status, ui64(OperationId.GetTxId()), ui64(ssId));

if (context.SS->IsServerlessDomain(TPath::Init(context.SS->RootPathId(), context.SS))) {
if (AppData()->ColumnShardConfig.GetDisabledOnSchemeShard()) {
result->SetError(NKikimrScheme::StatusPreconditionFailed,
"OLAP schema operations are not supported");
return result;
}
if (AppData()->ColumnShardConfig.GetDisabledOnSchemeShard() && context.SS->OlapStores.empty()) {
result->SetError(NKikimrScheme::StatusPreconditionFailed,
"OLAP schema operations are not supported");
return result;
}

NSchemeShard::TPath parentPath = NSchemeShard::TPath::Resolve(parentPathStr, context.SS);
Expand Down
10 changes: 4 additions & 6 deletions ydb/core/tx/schemeshard/olap/operations/create_table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -582,12 +582,10 @@ class TCreateColumnTable: public TSubOperation {
TEvSchemeShard::EStatus status = NKikimrScheme::StatusAccepted;
auto result = MakeHolder<TProposeResponse>(status, ui64(opTxId), ui64(ssId));

if (context.SS->IsServerlessDomain(TPath::Init(context.SS->RootPathId(), context.SS))) {
if (AppData()->ColumnShardConfig.GetDisabledOnSchemeShard()) {
result->SetError(NKikimrScheme::StatusPreconditionFailed,
"OLAP schema operations are not supported");
return result;
}
if (AppData()->ColumnShardConfig.GetDisabledOnSchemeShard() && context.SS->ColumnTables.empty()) {
result->SetError(NKikimrScheme::StatusPreconditionFailed,
"OLAP schema operations are not supported");
return result;
}

if (createDescription.GetSharding().GetColumnShards().size()) {
Expand Down
1 change: 1 addition & 0 deletions ydb/core/tx/tiering/ut/ut_tiers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,7 @@ Y_UNIT_TEST_SUITE(ColumnShardTiers) {

NKikimrConfig::TAppConfig appConfig;
appConfig.MutableTableServiceConfig()->SetEnablePreparedDdl(true);
appConfig.MutableColumnShardConfig()->SetDisabledOnSchemeShard(false);

Tests::TServerSettings serverSettings(msgbPort);
serverSettings.Port = msgbPort;
Expand Down
2 changes: 2 additions & 0 deletions ydb/tests/library/harness/resources/default_yaml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -256,3 +256,5 @@ federated_query_config:
uri: ""
pinger:
ping_period: "30s"
column_shard_config:
disabled_on_scheme_shard: false

0 comments on commit bf5f3d7

Please sign in to comment.