diff options
author | ivanmorozov <ivanmorozov@yandex-team.com> | 2023-06-11 19:34:27 +0300 |
---|---|---|
committer | ivanmorozov <ivanmorozov@yandex-team.com> | 2023-06-11 19:34:27 +0300 |
commit | 8d108cb49e53dba8299de246815caee5abc44585 (patch) | |
tree | 77e610f04f2d972a358fe0f2955b93fc6ea1fac2 | |
parent | 2772a086f3b58acf3d5bdf3efe84262b7d9f67b1 (diff) | |
download | ydb-8d108cb49e53dba8299de246815caee5abc44585.tar.gz |
additional logging
5 files changed, 17 insertions, 0 deletions
diff --git a/ydb/core/tx/columnshard/engines/reader/order_control/abstract.h b/ydb/core/tx/columnshard/engines/reader/order_control/abstract.h index 527c0bd8ed..14de62d85e 100644 --- a/ydb/core/tx/columnshard/engines/reader/order_control/abstract.h +++ b/ydb/core/tx/columnshard/engines/reader/order_control/abstract.h @@ -17,6 +17,7 @@ private: mutable std::optional<TFeatures> Features; protected: TReadMetadata::TConstPtr ReadMetadata; + virtual TString DoDebugString() const = 0; virtual void DoFill(TGranulesFillingContext& context) = 0; virtual bool DoWakeup(const TGranule& /*granule*/, TGranulesFillingContext& /*context*/) { return true; @@ -77,6 +78,10 @@ public: bool Wakeup(const TGranule& granule, TGranulesFillingContext& context) { return DoWakeup(granule, context); } + + TString DebugString() const { + return DoDebugString(); + } }; } diff --git a/ydb/core/tx/columnshard/engines/reader/order_control/default.h b/ydb/core/tx/columnshard/engines/reader/order_control/default.h index e56e19f30f..507488e9a8 100644 --- a/ydb/core/tx/columnshard/engines/reader/order_control/default.h +++ b/ydb/core/tx/columnshard/engines/reader/order_control/default.h @@ -10,6 +10,10 @@ private: protected: virtual void DoFill(TGranulesFillingContext& context) override; virtual std::vector<TGranule*> DoDetachReadyGranules(THashMap<ui64, NIndexedReader::TGranule*>& granulesToOut) override; + virtual TString DoDebugString() const override { + return TStringBuilder() << "type=AnySorting;granules_count=" << GranulesOutOrder.size() << ";"; + } + public: TAnySorting(TReadMetadata::TConstPtr readMetadata) :TBase(readMetadata) { diff --git a/ydb/core/tx/columnshard/engines/reader/order_control/not_sorted.h b/ydb/core/tx/columnshard/engines/reader/order_control/not_sorted.h index 499d929d03..c1c914044f 100644 --- a/ydb/core/tx/columnshard/engines/reader/order_control/not_sorted.h +++ b/ydb/core/tx/columnshard/engines/reader/order_control/not_sorted.h @@ -7,6 +7,10 @@ class TNonSorting: public IOrderPolicy { private: using TBase = IOrderPolicy; protected: + virtual TString DoDebugString() const override { + return TStringBuilder() << "type=NonSorting;"; + } + virtual void DoFill(TGranulesFillingContext& /*context*/) override { } diff --git a/ydb/core/tx/columnshard/engines/reader/order_control/pk_with_limit.h b/ydb/core/tx/columnshard/engines/reader/order_control/pk_with_limit.h index 79c2223897..3f5d17d24c 100644 --- a/ydb/core/tx/columnshard/engines/reader/order_control/pk_with_limit.h +++ b/ydb/core/tx/columnshard/engines/reader/order_control/pk_with_limit.h @@ -57,6 +57,9 @@ protected: return (TFeatures)EFeatures::CanInterrupt & (TFeatures)EFeatures::NeedNotAppliedEarlyFilter; } + virtual TString DoDebugString() const override { + return TStringBuilder() << "type=PKSortingWithLimit;granules_count=" << GranulesOutOrder.size() << ";limit=" << CurrentItemsLimit << ";"; + } public: virtual std::set<ui32> GetFilterStageColumns() override { std::set<ui32> result = ReadMetadata->GetEarlyFilterColumnIds(); diff --git a/ydb/core/tx/columnshard/engines/reader/read_metadata.cpp b/ydb/core/tx/columnshard/engines/reader/read_metadata.cpp index 614b794f3a..7e7220380a 100644 --- a/ydb/core/tx/columnshard/engines/reader/read_metadata.cpp +++ b/ydb/core/tx/columnshard/engines/reader/read_metadata.cpp @@ -226,6 +226,7 @@ NIndexedReader::IOrderPolicy::TPtr TReadMetadata::DoBuildSortingPolicy() const { std::shared_ptr<NIndexedReader::IOrderPolicy> TReadMetadata::BuildSortingPolicy() const { auto result = DoBuildSortingPolicy(); + AFL_DEBUG(NKikimrServices::TX_COLUMNSHARD_SCAN)("event", "sorting_policy_constructed")("info", result->DebugString()); NYDBTest::TControllers::GetColumnShardController()->OnSortingPolicy(result); return result; } |