Skip to content

Commit 8e40473

Browse files
authored
Merge c1c041a into fa53e40
2 parents fa53e40 + c1c041a commit 8e40473

File tree

6 files changed

+15
-13
lines changed

6 files changed

+15
-13
lines changed

ydb/core/tx/schemeshard/olap/manager/manager.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ class TTablesStorage {
104104
TTableCreatedGuard BuildNew(const TPathId& id, TColumnTableInfo::TPtr object);
105105
TTableExtractedGuard TakeVerified(const TPathId& id);
106106
TTableExtractedGuard TakeAlterVerified(const TPathId& id);
107-
107+
bool empty() const {
108+
return Tables.empty();
109+
}
108110
bool contains(const TPathId& id) const {
109111
return Tables.contains(id);
110112
}

ydb/core/tx/schemeshard/olap/operations/create_store.cpp

+4-6
Original file line numberDiff line numberDiff line change
@@ -327,12 +327,10 @@ class TCreateOlapStore: public TSubOperation {
327327
TEvSchemeShard::EStatus status = NKikimrScheme::StatusAccepted;
328328
auto result = MakeHolder<TProposeResponse>(status, ui64(OperationId.GetTxId()), ui64(ssId));
329329

330-
if (context.SS->IsServerlessDomain(TPath::Init(context.SS->RootPathId(), context.SS))) {
331-
if (AppData()->ColumnShardConfig.GetDisabledOnSchemeShard()) {
332-
result->SetError(NKikimrScheme::StatusPreconditionFailed,
333-
"OLAP schema operations are not supported");
334-
return result;
335-
}
330+
if (AppData()->ColumnShardConfig.GetDisabledOnSchemeShard() && context.SS->ColumnTables.empty()) {
331+
result->SetError(NKikimrScheme::StatusPreconditionFailed,
332+
"OLAP schema operations are not supported");
333+
return result;
336334
}
337335

338336
NSchemeShard::TPath parentPath = NSchemeShard::TPath::Resolve(parentPathStr, context.SS);

ydb/core/tx/schemeshard/olap/operations/create_table.cpp

+4-6
Original file line numberDiff line numberDiff line change
@@ -582,12 +582,10 @@ class TCreateColumnTable: public TSubOperation {
582582
TEvSchemeShard::EStatus status = NKikimrScheme::StatusAccepted;
583583
auto result = MakeHolder<TProposeResponse>(status, ui64(opTxId), ui64(ssId));
584584

585-
if (context.SS->IsServerlessDomain(TPath::Init(context.SS->RootPathId(), context.SS))) {
586-
if (AppData()->ColumnShardConfig.GetDisabledOnSchemeShard()) {
587-
result->SetError(NKikimrScheme::StatusPreconditionFailed,
588-
"OLAP schema operations are not supported");
589-
return result;
590-
}
585+
if (AppData()->ColumnShardConfig.GetDisabledOnSchemeShard() && context.SS->ColumnTables.empty()) {
586+
result->SetError(NKikimrScheme::StatusPreconditionFailed,
587+
"OLAP schema operations are not supported");
588+
return result;
591589
}
592590

593591
if (createDescription.GetSharding().GetColumnShards().size()) {

ydb/core/tx/tiering/ut/ut_tiers.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,7 @@ Y_UNIT_TEST_SUITE(ColumnShardTiers) {
418418

419419
NKikimrConfig::TAppConfig appConfig;
420420
appConfig.MutableTableServiceConfig()->SetEnablePreparedDdl(true);
421+
appConfig.MutableColumnShardConfig()->SetDisabledOnSchemeShard(false);
421422

422423
Tests::TServerSettings serverSettings(msgbPort);
423424
serverSettings.Port = msgbPort;

ydb/tests/functional/tenants/test_dynamic_tenants.py

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
'PERSQUEUE_CLUSTER_TRACKER': LogLevels.CRIT,
4343
},
4444
enable_alter_database_create_hive_first=True,
45+
4546
)
4647

4748

ydb/tests/library/harness/resources/default_yaml.yml

+2
Original file line numberDiff line numberDiff line change
@@ -256,3 +256,5 @@ federated_query_config:
256256
uri: ""
257257
pinger:
258258
ping_period: "30s"
259+
column_shard_config:
260+
disabled_on_scheme_shard: false

0 commit comments

Comments
 (0)