Skip to content

Commit 141ba2e

Browse files
authored
channels count fix for standalone table (#12410)
1 parent 3c14202 commit 141ba2e

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

ydb/core/statistics/service/ut/ut_http_request.cpp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,18 @@ void ProbeTest(bool isServerless) {
3838
TString columnName = "Value";
3939
const auto sender = runtime.AllocateEdgeActor();
4040

41+
bool firstStatsToSA = false;
42+
auto statsObserver1 = runtime.AddObserver<TEvStatistics::TEvSchemeShardStats>([&](auto& ev){
43+
firstStatsToSA = true;
44+
});
45+
runtime.WaitFor("TEvSchemeShardStats 1", [&]{ return firstStatsToSA; });
46+
47+
bool secondStatsToSA = false;
48+
auto statsObserver2 = runtime.AddObserver<TEvStatistics::TEvSchemeShardStats>([&](auto& ev){
49+
secondStatsToSA = true;
50+
});
51+
runtime.WaitFor("TEvSchemeShardStats 2", [&]{ return secondStatsToSA; });
52+
4153
const auto operationId = TULIDGenerator().Next(TInstant::Now()).ToBinary();
4254
auto analyzeRequest = MakeAnalyzeRequest({{tableInfo.PathId, {1, 2}}}, operationId);
4355
runtime.SendToPipe(tableInfo.SaTabletId, sender, analyzeRequest.release());
@@ -96,4 +108,4 @@ Y_UNIT_TEST_SUITE(HttpRequest) {
96108
}
97109

98110
} // NStat
99-
} // NKikimr
111+
} // NKikimr

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -785,8 +785,8 @@ class TCreateColumnTable: public TSubOperation {
785785
olapStorePath.Base()->LastTxId = opTxId;
786786
context.SS->PersistLastTxId(db, olapStorePath.Base());
787787
} else {
788-
NKikimrSchemeOp::TColumnStorageConfig storageConfig; // default
789-
storageConfig.SetDataChannelCount(1);
788+
tableInfo->StandaloneSharding = NKikimrSchemeOp::TColumnStoreSharding();
789+
const NKikimrSchemeOp::TColumnStorageConfig& storageConfig = tableInfo->Description.GetStorageConfig();
790790

791791
TChannelsBindings channelsBindings;
792792
if (!context.SS->GetOlapChannelsBindings(dstPath.GetPathIdForDomain(), storageConfig, channelsBindings, errStr)) {
@@ -800,7 +800,6 @@ class TCreateColumnTable: public TSubOperation {
800800
TShardInfo columnShardInfo = TShardInfo::ColumnShardInfo(opTxId, pathId);
801801
columnShardInfo.BindedChannels = channelsBindings;
802802

803-
tableInfo->StandaloneSharding = NKikimrSchemeOp::TColumnStoreSharding();
804803
Y_ABORT_UNLESS(tableInfo->GetOwnedColumnShardsVerified().empty());
805804

806805
for (ui64 i = 0; i < shardsCount; ++i) {

0 commit comments

Comments
 (0)