diff options
| author | ivanmorozov333 <[email protected]> | 2024-06-10 15:28:09 +0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-06-10 15:28:09 +0300 |
| commit | bb48a6bead2c42798b30d40533509b01e9f89b4f (patch) | |
| tree | 679765560329eee83112bd7c439c59b4f5a6c169 | |
| parent | 4cef62d2b9199a9d72a23c68179ef46d8abe05ef (diff) | |
channels usage for cs writing (64 by default) (#5385)
13 files changed, 106 insertions, 57 deletions
diff --git a/ydb/core/tx/columnshard/blobs_action/bs/address.cpp b/ydb/core/tx/columnshard/blobs_action/bs/address.cpp new file mode 100644 index 00000000000..20f52eee6ee --- /dev/null +++ b/ydb/core/tx/columnshard/blobs_action/bs/address.cpp @@ -0,0 +1,10 @@ +#include "address.h" +#include <util/string/builder.h> + +namespace NKikimr::NOlap::NBlobOperations::NBlobStorage { + +TString TBlobAddress::DebugString() const { + return TStringBuilder() << "g=" << GroupId << ";c=" << ChannelId << ";"; +} + +}
\ No newline at end of file diff --git a/ydb/core/tx/columnshard/blobs_action/bs/address.h b/ydb/core/tx/columnshard/blobs_action/bs/address.h new file mode 100644 index 00000000000..248e7a6fa9f --- /dev/null +++ b/ydb/core/tx/columnshard/blobs_action/bs/address.h @@ -0,0 +1,28 @@ +#pragma once +#include <ydb/library/accessor/accessor.h> +#include <util/system/types.h> +#include <util/generic/string.h> + +namespace NKikimr::NOlap::NBlobOperations::NBlobStorage { +class TBlobAddress { +private: + YDB_READONLY(ui32, GroupId, 0); + YDB_READONLY(ui32, ChannelId, 0); +public: + TBlobAddress(const ui32 groupId, const ui32 channelId) + : GroupId(groupId) + , ChannelId(channelId) { + + } + + TString DebugString() const; + + explicit operator size_t() const { + return GroupId << 32 + ChannelId; + } + + bool operator==(const TBlobAddress& item) const { + return GroupId == item.GroupId && ChannelId == item.ChannelId; + } +}; +}
\ No newline at end of file diff --git a/ydb/core/tx/columnshard/blobs_action/bs/blob_manager.cpp b/ydb/core/tx/columnshard/blobs_action/bs/blob_manager.cpp index 660b3c9b2b7..82fc99d750d 100644 --- a/ydb/core/tx/columnshard/blobs_action/bs/blob_manager.cpp +++ b/ydb/core/tx/columnshard/blobs_action/bs/blob_manager.cpp @@ -164,7 +164,7 @@ bool TBlobManager::LoadState(IBlobManagerDb& db, const TTabletId selfTabletId) { TGenStep genStep(blobId); Y_ABORT_UNLESS(LastCollectedGenStep < genStep); - BlobsToKeep.insert(blobId); + AFL_VERIFY(BlobsToKeep[genStep].emplace(blobId).second); BlobsManagerCounters.OnKeepMarker(blobId.BlobSize()); const ui64 groupId = dsGroupSelector.GetGroup(blobId); // Keep + DontKeep (probably in different gen:steps) @@ -218,7 +218,6 @@ std::deque<TGenStep> TBlobManager::FindNewGCBarriers() { class TBlobManager::TGCContext { private: - static inline const ui32 channelIdx = BLOB_CHANNEL; static inline const ui32 BlobsGCCountLimit = 50000; YDB_ACCESSOR_DEF(NBlobOperations::NBlobStorage::TGCTask::TGCListsByGroup, PerGroupGCListsInFlight); YDB_ACCESSOR_DEF(TTabletsByBlob, ExtractedToRemoveFromDB); @@ -234,10 +233,12 @@ public: void InitializeFirst(const TIntrusivePtr<TTabletStorageInfo>& tabletInfo) { // Clear all possibly not kept trash in channel's groups: create an event for each group // TODO: we need only actual channel history here - const auto& channelHistory = tabletInfo->ChannelInfo(channelIdx)->History; + for (ui32 channelIdx = 2; channelIdx < tabletInfo->Channels.size(); ++channelIdx) { + const auto& channelHistory = tabletInfo->ChannelInfo(channelIdx)->History; - for (auto it = channelHistory.begin(); it != channelHistory.end(); ++it) { - PerGroupGCListsInFlight[it->GroupID]; + for (auto it = channelHistory.begin(); it != channelHistory.end(); ++it) { + PerGroupGCListsInFlight[TBlobAddress(it->GroupID, channelIdx)]; + } } } @@ -267,10 +268,11 @@ void TBlobManager::DrainDeleteTo(const TGenStep& dest, TGCContext& gcContext) { TTabletId tabletId; TUnifiedBlobId unifiedBlobId; while (extractedOld.ExtractFront(tabletId, unifiedBlobId)) { + TBlobAddress bAddress(unifiedBlobId.GetDsGroup(), unifiedBlobId.GetLogoBlobId().Channel()); auto logoBlobId = unifiedBlobId.GetLogoBlobId(); if (!gcContext.GetSharedBlobsManager()->BuildStoreCategories({ unifiedBlobId }).GetDirect().IsEmpty()) { AFL_INFO(NKikimrServices::TX_COLUMNSHARD_BS)("to_delete_gc", unifiedBlobId.ToStringNew()); - NBlobOperations::NBlobStorage::TGCTask::TGCLists& gl = gcContext.MutablePerGroupGCListsInFlight()[unifiedBlobId.GetDsGroup()]; + NBlobOperations::NBlobStorage::TGCTask::TGCLists& gl = gcContext.MutablePerGroupGCListsInFlight()[bAddress]; gl.DontKeepList.insert(logoBlobId); } else { AFL_INFO(NKikimrServices::TX_COLUMNSHARD_BS)("to_delete_gc", unifiedBlobId.ToStringNew())("skip_reason", "not_direct"); @@ -279,34 +281,36 @@ void TBlobManager::DrainDeleteTo(const TGenStep& dest, TGCContext& gcContext) { } void TBlobManager::DrainKeepTo(const TGenStep& dest, TGCContext& gcContext) { - AFL_INFO(NKikimrServices::TX_COLUMNSHARD_BS)("event", "PreparePerGroupGCRequests")("gen_step", dest)("blobs_to_keep_count", BlobsToKeep.size()); - auto keepBlobIt = BlobsToKeep.begin(); - for (; keepBlobIt != BlobsToKeep.end(); ++keepBlobIt) { - TGenStep genStep{ keepBlobIt->Generation(), keepBlobIt->Step() }; - AFL_VERIFY(LastCollectedGenStep < genStep); + AFL_INFO(NKikimrServices::TX_COLUMNSHARD_BS)("event", "PreparePerGroupGCRequests")("gen_step", dest)("gs_blobs_to_keep_count", BlobsToKeep.size()); + for (; BlobsToKeep.size(); BlobsToKeep.erase(BlobsToKeep.begin())) { + auto gsBlobs = BlobsToKeep.begin(); + TGenStep genStep = gsBlobs->first; + AFL_VERIFY(LastCollectedGenStep < genStep)("last", LastCollectedGenStep.ToString())("gen", genStep.ToString()); if (dest < genStep) { break; } - const ui32 blobGroup = TabletInfo->GroupFor(keepBlobIt->Channel(), keepBlobIt->Generation()); - const TUnifiedBlobId keepUnified(blobGroup, *keepBlobIt); - gcContext.MutableKeepsToErase().emplace_back(keepUnified); - if (BlobsToDelete.ExtractBlobTo(keepUnified, gcContext.MutableExtractedToRemoveFromDB())) { - if (keepBlobIt->Generation() == CurrentGen) { - AFL_INFO(NKikimrServices::TX_COLUMNSHARD_BS)("to_not_keep", keepUnified.ToStringNew()); - continue; - } - if (gcContext.GetSharedBlobsManager()->BuildStoreCategories({ keepUnified }).GetDirect().IsEmpty()) { - AFL_INFO(NKikimrServices::TX_COLUMNSHARD_BS)("to_not_keep_not_direct", keepUnified.ToStringNew()); - continue; + for (auto&& keepBlobIt : gsBlobs->second) { + const ui32 blobGroup = TabletInfo->GroupFor(keepBlobIt.Channel(), keepBlobIt.Generation()); + TBlobAddress bAddress(blobGroup, keepBlobIt.Channel()); + const TUnifiedBlobId keepUnified(blobGroup, keepBlobIt); + gcContext.MutableKeepsToErase().emplace_back(keepUnified); + if (BlobsToDelete.ExtractBlobTo(keepUnified, gcContext.MutableExtractedToRemoveFromDB())) { + if (keepBlobIt.Generation() == CurrentGen) { + AFL_INFO(NKikimrServices::TX_COLUMNSHARD_BS)("to_not_keep", keepUnified.ToStringNew()); + continue; + } + if (gcContext.GetSharedBlobsManager()->BuildStoreCategories({ keepUnified }).GetDirect().IsEmpty()) { + AFL_INFO(NKikimrServices::TX_COLUMNSHARD_BS)("to_not_keep_not_direct", keepUnified.ToStringNew()); + continue; + } + AFL_INFO(NKikimrServices::TX_COLUMNSHARD_BS)("to_not_keep_old", keepUnified.ToStringNew()); + gcContext.MutablePerGroupGCListsInFlight()[bAddress].DontKeepList.insert(keepBlobIt); + } else { + AFL_INFO(NKikimrServices::TX_COLUMNSHARD_BS)("to_keep", keepUnified.ToStringNew()); + gcContext.MutablePerGroupGCListsInFlight()[bAddress].KeepList.insert(keepBlobIt); } - AFL_INFO(NKikimrServices::TX_COLUMNSHARD_BS)("to_not_keep_old", keepUnified.ToStringNew()); - gcContext.MutablePerGroupGCListsInFlight()[blobGroup].DontKeepList.insert(*keepBlobIt); - } else { - AFL_INFO(NKikimrServices::TX_COLUMNSHARD_BS)("to_keep", keepUnified.ToStringNew()); - gcContext.MutablePerGroupGCListsInFlight()[blobGroup].KeepList.insert(*keepBlobIt); } } - BlobsToKeep.erase(BlobsToKeep.begin(), keepBlobIt); } std::shared_ptr<NBlobOperations::NBlobStorage::TGCTask> TBlobManager::BuildGCTask(const TString& storageId, @@ -374,13 +378,14 @@ std::shared_ptr<NBlobOperations::NBlobStorage::TGCTask> TBlobManager::BuildGCTas return result; } -TBlobBatch TBlobManager::StartBlobBatch(ui32 channel) { - ++CountersUpdate.BatchesStarted; - Y_ABORT_UNLESS(channel == BLOB_CHANNEL, "Support for multiple blob channels is not implemented yet"); +TBlobBatch TBlobManager::StartBlobBatch() { ++CurrentStep; + AFL_VERIFY(TabletInfo->Channels.size() > 2); + const auto& channel = TabletInfo->Channels[(CurrentStep % (TabletInfo->Channels.size() - 2)) + 2]; + ++CountersUpdate.BatchesStarted; TAllocatedGenStepConstPtr genStepRef = new TAllocatedGenStep({ CurrentGen, CurrentStep }); AllocatedGenSteps.push_back(genStepRef); - auto batchInfo = std::make_unique<TBlobBatch::TBatchInfo>(TabletInfo, genStepRef, channel, BlobsManagerCounters); + auto batchInfo = std::make_unique<TBlobBatch::TBatchInfo>(TabletInfo, genStepRef, channel.Channel, BlobsManagerCounters); return TBlobBatch(std::move(batchInfo)); } @@ -403,7 +408,7 @@ void TBlobManager::DoSaveBlobBatchOnComplete(TBlobBatch&& blobBatch) { AFL_INFO(NKikimrServices::TX_COLUMNSHARD_BS)("to_keep", logoBlobId.ToString()); BlobsManagerCounters.OnKeepMarker(logoBlobId.BlobSize()); - BlobsToKeep.insert(std::move(logoBlobId)); + AFL_VERIFY(BlobsToKeep[genStep].emplace(logoBlobId).second); } BlobsManagerCounters.OnBlobsKeep(BlobsToKeep); diff --git a/ydb/core/tx/columnshard/blobs_action/bs/blob_manager.h b/ydb/core/tx/columnshard/blobs_action/bs/blob_manager.h index 8f207724c67..75f83a6e191 100644 --- a/ydb/core/tx/columnshard/blobs_action/bs/blob_manager.h +++ b/ydb/core/tx/columnshard/blobs_action/bs/blob_manager.h @@ -1,5 +1,7 @@ #pragma once +#include "address.h" + #include <ydb/core/tx/columnshard/blob.h> #include <ydb/core/tx/columnshard/blobs_action/blob_manager_db.h> #include <ydb/core/tx/columnshard/blobs_action/abstract/storage.h> @@ -11,6 +13,7 @@ #include <ydb/core/protos/tx_columnshard.pb.h> #include <util/generic/string.h> +#include <map> namespace NKikimr::NOlap::NBlobOperations::NBlobStorage { class TGCTask; @@ -73,13 +76,12 @@ protected: virtual void DoSaveBlobBatchOnExecute(const TBlobBatch& blobBatch, IBlobManagerDb& db) = 0; virtual void DoSaveBlobBatchOnComplete(TBlobBatch&& blobBatch) = 0; public: - static constexpr ui32 BLOB_CHANNEL = 2; virtual ~IBlobManager() = default; // Allocates a temporary blob batch with the BlobManager. If the tablet crashes or if // this object is destroyed without doing SaveBlobBatch then all blobs in this batch // will get garbage-collected. - virtual TBlobBatch StartBlobBatch(ui32 channel = BLOB_CHANNEL) = 0; + virtual TBlobBatch StartBlobBatch() = 0; // This method is called in the same transaction in which the user saves references to blobs // in some LocalDB table. It tells the BlobManager that the blobs are becoming permanently saved. @@ -136,6 +138,7 @@ private: static constexpr ui64 GC_INTERVAL_SECONDS_DEFAULT = 60; private: + using TBlobAddress = NBlobOperations::NBlobStorage::TBlobAddress; class TGCContext; const TTabletId SelfTabletId; TIntrusivePtr<TTabletStorageInfo> TabletInfo; @@ -145,7 +148,7 @@ private: TControlWrapper GCIntervalSeconds; std::optional<TGenStep> CollectGenStepInFlight; // Lists of blobs that need Keep flag to be set - TSet<TLogoBlobID> BlobsToKeep; + std::map<TGenStep, std::set<TLogoBlobID>> BlobsToKeep; // Lists of blobs that need DoNotKeep flag to be set TTabletsByBlob BlobsToDelete; @@ -228,7 +231,7 @@ public: } // Implementation of IBlobManager interface - TBlobBatch StartBlobBatch(ui32 channel = BLOB_CHANNEL) override; + TBlobBatch StartBlobBatch() override; virtual void DeleteBlobOnExecute(const TTabletId tabletId, const TUnifiedBlobId& blobId, IBlobManagerDb& db) override; virtual void DeleteBlobOnComplete(const TTabletId tabletId, const TUnifiedBlobId& blobId) override; private: diff --git a/ydb/core/tx/columnshard/blobs_action/bs/gc.cpp b/ydb/core/tx/columnshard/blobs_action/bs/gc.cpp index 65f3ad2172f..d78f23d4442 100644 --- a/ydb/core/tx/columnshard/blobs_action/bs/gc.cpp +++ b/ydb/core/tx/columnshard/blobs_action/bs/gc.cpp @@ -46,8 +46,9 @@ TGCTask::TGCTask(const TString& storageId, TGCListsByGroup&& listsByGroupId, con void TGCTask::OnGCResult(TEvBlobStorage::TEvCollectGarbageResult::TPtr ev) { AFL_VERIFY(ev->Get()->Status == NKikimrProto::OK)("status", ev->Get()->Status)("details", ev->Get()->ToString())("action_id", GetActionGuid()); - auto itGroup = ListsByGroupId.find(ev->Cookie); - Y_ABORT_UNLESS(itGroup != ListsByGroupId.end()); + TBlobAddress bAddress(ev->Cookie, ev->Get()->Channel); + auto itGroup = ListsByGroupId.find(bAddress); + AFL_VERIFY(itGroup != ListsByGroupId.end())("address", bAddress.DebugString()); ListsByGroupId.erase(itGroup); } @@ -55,17 +56,16 @@ namespace { static TAtomicCounter PerGenerationCounter = 1; } -std::unique_ptr<TEvBlobStorage::TEvCollectGarbage> TGCTask::BuildRequest(const ui64 groupId) const { - const ui32 channelIdx = IBlobManager::BLOB_CHANNEL; - auto it = ListsByGroupId.find(groupId); +std::unique_ptr<TEvBlobStorage::TEvCollectGarbage> TGCTask::BuildRequest(const TBlobAddress& address) const { + auto it = ListsByGroupId.find(address); AFL_VERIFY(it != ListsByGroupId.end()); - AFL_VERIFY(++it->second.RequestsCount < 10)("event", "build_gc_request")("group_id", groupId)("current_gen", CurrentGen)("gen", CollectGenStepInFlight) + AFL_VERIFY(++it->second.RequestsCount < 10)("event", "build_gc_request")("address", address.DebugString())("current_gen", CurrentGen)("gen", CollectGenStepInFlight) ("count", it->second.RequestsCount); - AFL_DEBUG(NKikimrServices::TX_COLUMNSHARD)("event", "build_gc_request")("group_id", groupId)("current_gen", CurrentGen)("gen", CollectGenStepInFlight) + AFL_DEBUG(NKikimrServices::TX_COLUMNSHARD)("event", "build_gc_request")("address", address.DebugString())("current_gen", CurrentGen)("gen", CollectGenStepInFlight) ("count", it->second.RequestsCount); auto result = std::make_unique<TEvBlobStorage::TEvCollectGarbage>( TabletId, CurrentGen, PerGenerationCounter.Val(), - channelIdx, true, + address.GetChannelId(), true, CollectGenStepInFlight.Generation(), CollectGenStepInFlight.Step(), new TVector<TLogoBlobID>(it->second.KeepList.begin(), it->second.KeepList.end()), new TVector<TLogoBlobID>(it->second.DontKeepList.begin(), it->second.DontKeepList.end()), diff --git a/ydb/core/tx/columnshard/blobs_action/bs/gc.h b/ydb/core/tx/columnshard/blobs_action/bs/gc.h index 1511f03a10b..632834329a6 100644 --- a/ydb/core/tx/columnshard/blobs_action/bs/gc.h +++ b/ydb/core/tx/columnshard/blobs_action/bs/gc.h @@ -1,5 +1,6 @@ #pragma once +#include "address.h" #include "blob_manager.h" #include <ydb/core/tx/columnshard/blob_cache.h> @@ -17,7 +18,7 @@ public: THashSet<TLogoBlobID> DontKeepList; mutable ui32 RequestsCount = 0; }; - using TGCListsByGroup = THashMap<ui32, TGCLists>; + using TGCListsByGroup = THashMap<TBlobAddress, TGCLists>; private: TGCListsByGroup ListsByGroupId; TGenStep CollectGenStepInFlight; @@ -55,7 +56,7 @@ public: void OnGCResult(TEvBlobStorage::TEvCollectGarbageResult::TPtr ev); - std::unique_ptr<TEvBlobStorage::TEvCollectGarbage> BuildRequest(const ui64 groupId) const; + std::unique_ptr<TEvBlobStorage::TEvCollectGarbage> BuildRequest(const TBlobAddress& address) const; }; } diff --git a/ydb/core/tx/columnshard/blobs_action/bs/gc_actor.cpp b/ydb/core/tx/columnshard/blobs_action/bs/gc_actor.cpp index 8c2e792024e..b198114d0be 100644 --- a/ydb/core/tx/columnshard/blobs_action/bs/gc_actor.cpp +++ b/ydb/core/tx/columnshard/blobs_action/bs/gc_actor.cpp @@ -14,7 +14,7 @@ void TGarbageCollectionActor::Handle(TEvBlobStorage::TEvCollectGarbageResult::TP CheckFinished(); } else { ACFL_ERROR()("event", "GC_ERROR")("details", ev->Get()->Print(true)); - SendToBSProxy(NActors::TActivationContext::AsActorContext(), ev->Cookie, GCTask->BuildRequest(ev->Cookie).release(), ev->Cookie); + SendToBSProxy(NActors::TActivationContext::AsActorContext(), ev->Cookie, GCTask->BuildRequest(TBlobAddress(ev->Cookie, ev->Get()->Channel)).release(), ev->Cookie); } } diff --git a/ydb/core/tx/columnshard/blobs_action/bs/gc_actor.h b/ydb/core/tx/columnshard/blobs_action/bs/gc_actor.h index cddb4244816..4e2ffa3ebf2 100644 --- a/ydb/core/tx/columnshard/blobs_action/bs/gc_actor.h +++ b/ydb/core/tx/columnshard/blobs_action/bs/gc_actor.h @@ -42,7 +42,7 @@ public: for (auto&& i : GCTask->GetListsByGroupId()) { auto request = GCTask->BuildRequest(i.first); AFL_VERIFY(request); - SendToBSProxy(ctx, i.first, request.release(), i.first); + SendToBSProxy(ctx, i.first.GetGroupId(), request.release(), i.first.GetGroupId()); } TBase::Bootstrap(ctx); Become(&TGarbageCollectionActor::StateWork); diff --git a/ydb/core/tx/columnshard/blobs_action/bs/ya.make b/ydb/core/tx/columnshard/blobs_action/bs/ya.make index 96b89d123e9..c1930bc363e 100644 --- a/ydb/core/tx/columnshard/blobs_action/bs/ya.make +++ b/ydb/core/tx/columnshard/blobs_action/bs/ya.make @@ -1,6 +1,7 @@ LIBRARY() SRCS( + address.cpp gc.cpp gc_actor.cpp write.cpp diff --git a/ydb/core/tx/columnshard/counters/blobs_manager.cpp b/ydb/core/tx/columnshard/counters/blobs_manager.cpp index 1a590fb3638..1da1ac7ff86 100644 --- a/ydb/core/tx/columnshard/counters/blobs_manager.cpp +++ b/ydb/core/tx/columnshard/counters/blobs_manager.cpp @@ -42,7 +42,7 @@ TBlobsManagerCounters::TBlobsManagerCounters(const TString& module) KeepMarkerBytes = TBase::GetDeriviative("GC/KeepMarker/Bytes"); } -void TBlobsManagerCounters::OnBlobsKeep(const TSet<TLogoBlobID>& blobs) const { +void TBlobsManagerCounters::OnBlobsKeep(const std::map<::NKikimr::TGenStep, std::set<TLogoBlobID>>& blobs) const { AFL_DEBUG(NKikimrServices::TX_COLUMNSHARD)("event", "OnBlobsKeep")("count", blobs.size()); // BlobsKeepCount->Set(blobs.size()); // ui64 size = 0; diff --git a/ydb/core/tx/columnshard/counters/blobs_manager.h b/ydb/core/tx/columnshard/counters/blobs_manager.h index 8fdc2543626..2c555eaac9f 100644 --- a/ydb/core/tx/columnshard/counters/blobs_manager.h +++ b/ydb/core/tx/columnshard/counters/blobs_manager.h @@ -5,6 +5,7 @@ #include <ydb/core/tx/columnshard/blobs_action/abstract/common.h> #include <library/cpp/monlib/dynamic_counters/counters.h> +#include <ydb/core/util/gen_step.h> namespace NKikimr::NOlap { class TTabletsByBlob; @@ -53,7 +54,7 @@ public: KeepMarkerBytes->Add(size); } - void OnBlobsKeep(const TSet<TLogoBlobID>& blobs) const; + void OnBlobsKeep(const std::map<::NKikimr::TGenStep, std::set<TLogoBlobID>>& blobs) const; void OnBlobsDelete(const NOlap::TTabletsByBlob& blobs) const; diff --git a/ydb/core/tx/schemeshard/olap/operations/create_table.cpp b/ydb/core/tx/schemeshard/olap/operations/create_table.cpp index 4bd7f6ad4d6..72b20d2f0d6 100644 --- a/ydb/core/tx/schemeshard/olap/operations/create_table.cpp +++ b/ydb/core/tx/schemeshard/olap/operations/create_table.cpp @@ -174,7 +174,7 @@ private: class TOlapTableConstructor : public TTableConstructorBase { TOlapSchema TableSchema; - bool HasDataChannels = false; + ui32 ChannelsCount = 64; private: bool DoDeserialize(const NKikimrSchemeOp::TColumnTableDescription& description, IErrorCollector& errors) override { if (description.HasSchemaPresetName() || description.HasSchemaPresetId()) { @@ -187,7 +187,9 @@ private: return false; } - HasDataChannels = description.GetStorageConfig().HasDataChannelCount(); + if (description.GetStorageConfig().HasDataChannelCount()) { + ChannelsCount = description.GetStorageConfig().GetDataChannelCount(); + } TOlapSchemaUpdate schemaDiff; if (!schemaDiff.Parse(description.GetSchema(), errors)) { @@ -203,9 +205,7 @@ private: private: TConclusionStatus BuildDescription(const TOperationContext& /*context*/, TColumnTableInfo::TPtr& table) const override { auto& description = table->Description; - if (HasDataChannels) { - description.MutableStorageConfig()->SetDataChannelCount(1); - } + description.MutableStorageConfig()->SetDataChannelCount(ChannelsCount); TableSchema.Serialize(*description.MutableSchema()); return TConclusionStatus::Success(); } diff --git a/ydb/core/tx/schemeshard/olap/store/store.cpp b/ydb/core/tx/schemeshard/olap/store/store.cpp index 9d34a0ad8dd..f9ba52fa0f2 100644 --- a/ydb/core/tx/schemeshard/olap/store/store.cpp +++ b/ydb/core/tx/schemeshard/olap/store/store.cpp @@ -134,7 +134,7 @@ bool TOlapStoreInfo::ParseFromRequest(const NKikimrSchemeOp::TColumnStoreDescrip StorageConfig = descriptionProto.GetStorageConfig(); // Make it easier by having data channel count always specified internally if (!StorageConfig.HasDataChannelCount()) { - StorageConfig.SetDataChannelCount(1); + StorageConfig.SetDataChannelCount(64); } size_t protoIndex = 0; |
