Skip to content

Commit 2adb16f

Browse files
authored
Merge 51f46b8 into 80bf6ef
2 parents 80bf6ef + 51f46b8 commit 2adb16f

File tree

5 files changed

+14
-13
lines changed

5 files changed

+14
-13
lines changed

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

Lines changed: 4 additions & 6 deletions
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->OlapStores.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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -607,12 +607,10 @@ class TCreateColumnTable: public TSubOperation {
607607
TEvSchemeShard::EStatus status = NKikimrScheme::StatusAccepted;
608608
auto result = MakeHolder<TProposeResponse>(status, ui64(opTxId), ui64(ssId));
609609

610-
if (context.SS->IsServerlessDomain(TPath::Init(context.SS->RootPathId(), context.SS))) {
611-
if (AppData()->ColumnShardConfig.GetDisabledOnSchemeShard()) {
612-
result->SetError(NKikimrScheme::StatusPreconditionFailed,
613-
"OLAP schema operations are not supported");
614-
return result;
615-
}
610+
if (AppData()->ColumnShardConfig.GetDisabledOnSchemeShard() && context.SS->ColumnTables.empty()) {
611+
result->SetError(NKikimrScheme::StatusPreconditionFailed,
612+
"OLAP schema operations are not supported");
613+
return result;
616614
}
617615

618616
TOlapStoreInfo::TPtr storeInfo;

ydb/core/tx/schemeshard/schemeshard_tables_storage.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,9 @@ class TTablesStorage {
252252
TTableCreatedGuard BuildNew(const TPathId& id, TColumnTableInfo::TPtr object);
253253
TTableExtractedGuard TakeVerified(const TPathId& id);
254254
TTableExtractedGuard TakeAlterVerified(const TPathId& id);
255-
255+
bool empty() const {
256+
return Tables.empty();
257+
}
256258
bool contains(const TPathId& id) const {
257259
return Tables.contains(id);
258260
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,7 @@ Y_UNIT_TEST_SUITE(ColumnShardTiers) {
416416

417417
NKikimrConfig::TAppConfig appConfig;
418418
appConfig.MutableTableServiceConfig()->SetEnablePreparedDdl(true);
419+
appConfig.MutableColumnShardConfig()->SetDisabledOnSchemeShard(false);
419420

420421
Tests::TServerSettings serverSettings(msgbPort);
421422
serverSettings.Port = msgbPort;

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

Lines changed: 2 additions & 0 deletions
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)