2
2
#include " common/owner.h"
3
3
4
4
#include < ydb/core/base/logoblob.h>
5
+ #include < ydb/core/tx/columnshard/blobs_action/abstract/blob_set.h>
5
6
#include < ydb/core/tx/columnshard/blobs_action/abstract/common.h>
6
7
7
8
#include < library/cpp/monlib/dynamic_counters/counters.h>
@@ -13,99 +14,53 @@ class TTabletsByBlob;
13
14
14
15
namespace NKikimr ::NColumnShard {
15
16
16
- class TBlobsManagerCounters : public TCommonCountersOwner {
17
+ class TBlobsManagerGCCounters : public TCommonCountersOwner {
17
18
private:
18
19
using TBase = TCommonCountersOwner;
19
- NMonitoring::TDynamicCounters::TCounterPtr CollectDropExplicitBytes;
20
- NMonitoring::TDynamicCounters::TCounterPtr CollectDropExplicitCount;
21
- NMonitoring::TDynamicCounters::TCounterPtr CollectDropImplicitBytes;
22
- NMonitoring::TDynamicCounters::TCounterPtr CollectDropImplicitCount;
23
- NMonitoring::TDynamicCounters::TCounterPtr CollectKeepBytes;
24
- NMonitoring::TDynamicCounters::TCounterPtr CollectKeepCount;
25
- NMonitoring::TDynamicCounters::TCounterPtr PutBlobBytes;
26
- NMonitoring::TDynamicCounters::TCounterPtr PutBlobCount;
27
- NMonitoring::TDynamicCounters::TCounterPtr CollectGen;
28
- NMonitoring::TDynamicCounters::TCounterPtr CollectStep;
29
- NMonitoring::TDynamicCounters::TCounterPtr DeleteBlobMarkerBytes;
30
- NMonitoring::TDynamicCounters::TCounterPtr DeleteBlobMarkerCount;
31
- NMonitoring::TDynamicCounters::TCounterPtr DeleteBlobDelayedMarkerBytes;
32
- NMonitoring::TDynamicCounters::TCounterPtr DeleteBlobDelayedMarkerCount;
33
- NMonitoring::TDynamicCounters::TCounterPtr AddSmallBlobBytes;
34
- NMonitoring::TDynamicCounters::TCounterPtr AddSmallBlobCount;
35
- NMonitoring::TDynamicCounters::TCounterPtr DeleteSmallBlobBytes;
36
- NMonitoring::TDynamicCounters::TCounterPtr DeleteSmallBlobCount;
37
- NMonitoring::TDynamicCounters::TCounterPtr BrokenKeepCount;
38
- NMonitoring::TDynamicCounters::TCounterPtr BrokenKeepBytes;
39
- NMonitoring::TDynamicCounters::TCounterPtr BlobsKeepCount;
40
- NMonitoring::TDynamicCounters::TCounterPtr BlobsKeepBytes;
41
- NMonitoring::TDynamicCounters::TCounterPtr BlobsDeleteCount;
42
- NMonitoring::TDynamicCounters::TCounterPtr BlobsDeleteBytes;
43
- NMonitoring::TDynamicCounters::TCounterPtr KeepMarkerCount;
44
- NMonitoring::TDynamicCounters::TCounterPtr KeepMarkerBytes;
45
-
20
+ NMonitoring::THistogramPtr KeepsCountBytes;
21
+ NMonitoring::THistogramPtr KeepsCountBlobs;
22
+ NMonitoring::THistogramPtr KeepsCountTasks;
23
+ NMonitoring::THistogramPtr DeletesCountBytes;
24
+ NMonitoring::THistogramPtr DeletesCountBlobs;
25
+ NMonitoring::THistogramPtr DeletesCountTasks;
26
+ NMonitoring::TDynamicCounters::TCounterPtr FullGCTasks;
27
+ NMonitoring::TDynamicCounters::TCounterPtr MoveBarriers;
28
+ NMonitoring::TDynamicCounters::TCounterPtr DontMoveBarriers;
29
+ NMonitoring::TDynamicCounters::TCounterPtr GCTasks;
30
+ NMonitoring::TDynamicCounters::TCounterPtr EmptyGCTasks;
46
31
public:
47
- NMonitoring::TDynamicCounters::TCounterPtr SkipCollection;
48
- NMonitoring::TDynamicCounters::TCounterPtr StartCollection;
49
-
50
- TBlobsManagerCounters (const TString& module );
51
-
52
- void OnKeepMarker (const ui64 size) const {
53
- KeepMarkerCount->Add (1 );
54
- KeepMarkerBytes->Add (size);
55
- }
56
-
57
- void OnBlobsKeep (const std::map<::NKikimr::TGenStep, std::set<TLogoBlobID>>& blobs) const ;
58
-
59
- void OnBlobsDelete (const NOlap::TTabletsByBlob& blobs) const ;
60
-
61
- void OnAddSmallBlob (const ui32 bSize) const {
62
- AddSmallBlobBytes->Add (bSize);
63
- AddSmallBlobCount->Add (1 );
64
- }
65
-
66
- void OnDeleteBlobDelayedMarker (const ui32 bSize) const {
67
- DeleteBlobDelayedMarkerBytes->Add (bSize);
68
- DeleteBlobDelayedMarkerCount->Add (1 );
69
- }
70
-
71
- void OnDeleteBlobMarker (const ui32 bSize) const {
72
- DeleteBlobMarkerBytes->Add (bSize);
73
- DeleteBlobMarkerCount->Add (1 );
74
- }
32
+ const NMonitoring::TDynamicCounters::TCounterPtr SkipCollectionEmpty;
33
+ const NMonitoring::TDynamicCounters::TCounterPtr SkipCollectionThrottling;
75
34
76
- void OnNewCollectStep (const ui32 gen, const ui32 step) const {
77
- CollectGen->Set (gen);
78
- CollectStep->Set (step);
79
- }
35
+ TBlobsManagerGCCounters (const TCommonCountersOwner& sameAs, const TString& componentName);
80
36
81
- void OnDeleteSmallBlob (const ui32 bSize) const {
82
- DeleteSmallBlobBytes->Add (bSize);
83
- DeleteSmallBlobCount->Add (1 );
84
- }
37
+ void OnGCTask (const ui32 keepsCount, const ui32 keepBytes, const ui32 deleteCount, const ui32 deleteBytes,
38
+ const bool isFull, const bool moveBarrier) const ;
85
39
86
- void OnPutResult (const ui32 bSize) const {
87
- PutBlobBytes->Add (bSize);
88
- PutBlobCount->Add (1 );
89
- }
90
-
91
- void OnCollectKeep (const ui32 bSize) const {
92
- CollectKeepBytes->Add (bSize);
93
- CollectKeepCount->Add (1 );
40
+ void OnEmptyGCTask () const {
41
+ EmptyGCTasks->Add (1 );
94
42
}
43
+ };
95
44
96
- void OnBrokenKeep (const ui32 bSize) const {
97
- BrokenKeepBytes->Add (bSize);
98
- BrokenKeepCount->Add (1 );
45
+ class TBlobsManagerCounters : public TCommonCountersOwner {
46
+ private:
47
+ using TBase = TCommonCountersOwner;
48
+ const NMonitoring::TDynamicCounters::TCounterPtr BlobsToDeleteCount;
49
+ const NMonitoring::TDynamicCounters::TCounterPtr BlobsToDeleteDelayedCount;
50
+ const NMonitoring::TDynamicCounters::TCounterPtr BlobsToKeepCount;
51
+ public:
52
+ const NMonitoring::TDynamicCounters::TCounterPtr CurrentGen;
53
+ const NMonitoring::TDynamicCounters::TCounterPtr CurrentStep;
54
+ const TBlobsManagerGCCounters GCCounters;
55
+ TBlobsManagerCounters (const TString& module );
56
+ void OnBlobsToDelete (const NOlap::TTabletsByBlob& blobs) const {
57
+ BlobsToDeleteCount->Set (blobs.GetSize ());
99
58
}
100
-
101
- void OnCollectDropExplicit (const ui32 bSize) const {
102
- CollectDropExplicitBytes->Add (bSize);
103
- CollectDropExplicitCount->Add (1 );
59
+ void OnBlobsToKeep (const NOlap::TBlobsByGenStep& blobs) const {
60
+ BlobsToKeepCount->Set (blobs.GetSize ());
104
61
}
105
-
106
- void OnCollectDropImplicit (const ui32 bSize) const {
107
- CollectDropImplicitBytes->Add (bSize);
108
- CollectDropImplicitCount->Add (1 );
62
+ void OnBlobsToDeleteDelayed (const NOlap::TTabletsByBlob& blobs) const {
63
+ BlobsToDeleteDelayedCount->Set (blobs.GetSize ());
109
64
}
110
65
};
111
66
0 commit comments