File tree 5 files changed +14
-13
lines changed
tests/library/harness/resources
5 files changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,9 @@ class TTablesStorage {
104
104
TTableCreatedGuard BuildNew (const TPathId& id, TColumnTableInfo::TPtr object);
105
105
TTableExtractedGuard TakeVerified (const TPathId& id);
106
106
TTableExtractedGuard TakeAlterVerified (const TPathId& id);
107
-
107
+ bool empty () const {
108
+ return Tables.empty ();
109
+ }
108
110
bool contains (const TPathId& id) const {
109
111
return Tables.contains (id);
110
112
}
Original file line number Diff line number Diff line change @@ -327,12 +327,10 @@ class TCreateOlapStore: public TSubOperation {
327
327
TEvSchemeShard::EStatus status = NKikimrScheme::StatusAccepted;
328
328
auto result = MakeHolder<TProposeResponse>(status, ui64 (OperationId.GetTxId ()), ui64 (ssId));
329
329
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;
336
334
}
337
335
338
336
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 {
582
582
TEvSchemeShard::EStatus status = NKikimrScheme::StatusAccepted;
583
583
auto result = MakeHolder<TProposeResponse>(status, ui64 (opTxId), ui64 (ssId));
584
584
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;
591
589
}
592
590
593
591
if (createDescription.GetSharding ().GetColumnShards ().size ()) {
Original file line number Diff line number Diff line change @@ -418,6 +418,7 @@ Y_UNIT_TEST_SUITE(ColumnShardTiers) {
418
418
419
419
NKikimrConfig::TAppConfig appConfig;
420
420
appConfig.MutableTableServiceConfig ()->SetEnablePreparedDdl (true );
421
+ appConfig.MutableColumnShardConfig ()->SetDisabledOnSchemeShard (false );
421
422
422
423
Tests::TServerSettings serverSettings (msgbPort);
423
424
serverSettings.Port = msgbPort;
Original file line number Diff line number Diff line change @@ -256,3 +256,5 @@ federated_query_config:
256
256
uri : " "
257
257
pinger :
258
258
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