File tree Expand file tree Collapse file tree 5 files changed +14
-13
lines changed
tests/library/harness/resources Expand file tree Collapse file tree 5 files changed +14
-13
lines changed Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff 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 );
Original file line number Diff line number Diff 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 ()) {
Original file line number Diff line number Diff 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;
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments