From a35afbc8321f4ac6035e8848297fd41feb164217 Mon Sep 17 00:00:00 2001 From: nsofya Date: Tue, 6 Feb 2024 14:32:30 +0300 Subject: [PATCH] Fix GetColumnSerializationStats and ResourceSubscriber task name (#1618) --- ydb/core/tx/columnshard/normalizer/abstract/abstract.h | 2 +- ydb/core/tx/columnshard/splitter/batch_slice.h | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ydb/core/tx/columnshard/normalizer/abstract/abstract.h b/ydb/core/tx/columnshard/normalizer/abstract/abstract.h index 89e75a67e091..538e1a1d44f0 100644 --- a/ydb/core/tx/columnshard/normalizer/abstract/abstract.h +++ b/ydb/core/tx/columnshard/normalizer/abstract/abstract.h @@ -101,7 +101,7 @@ namespace NKikimr::NOlap { public: TNormalizationController(std::shared_ptr storagesManager, const std::shared_ptr& counters) : StoragesManager(storagesManager) - , TaskSubscription("CS:NORMALIZER", counters) {} + , TaskSubscription("CS::NORMALIZER", counters) {} const NOlap::NResourceBroker::NSubscribe::TTaskContext& GetTaskSubscription() const { return TaskSubscription; diff --git a/ydb/core/tx/columnshard/splitter/batch_slice.h b/ydb/core/tx/columnshard/splitter/batch_slice.h index a97a1e1770e7..0c0aca979feb 100644 --- a/ydb/core/tx/columnshard/splitter/batch_slice.h +++ b/ydb/core/tx/columnshard/splitter/batch_slice.h @@ -73,7 +73,11 @@ class TDefaultSchemaDetails: public ISchemaDetailInfo { } virtual std::optional GetColumnSerializationStats(const ui32 columnId) const override { - return Stats->GetColumnInfo(columnId); + auto stats = Stats->GetColumnInfo(columnId); + if (stats && stats->GetRecordsCount() != 0) { + return stats; + } + return std::nullopt; } virtual std::optional GetBatchSerializationStats(const std::shared_ptr& rb) const override { return Stats->GetStatsForRecordBatch(rb);