25
25
#include < ydb/core/tx/tiering/manager.h>
26
26
#include < ydb/core/tx/time_cast/time_cast.h>
27
27
#include < ydb/core/tx/tx_processing.h>
28
+ #include < ydb/core/tx/locks/locks.h>
28
29
#include < ydb/services/metadata/service.h>
29
30
31
+ #include < ydb/core/tx/datashard/datashard_user_table.h>
32
+
30
33
namespace NKikimr ::NOlap {
31
34
class TCleanupColumnEngineChanges ;
32
35
class TTTLColumnEngineChanges ;
@@ -206,10 +209,6 @@ class TColumnShard
206
209
TabletCounters->Cumulative ()[counter].Increment (num);
207
210
}
208
211
209
- void IncCounter (NColumnShard::EPercentileCounters counter, const TDuration& latency) const {
210
- TabletCounters->Percentile ()[counter].IncrementFor (latency.MicroSeconds ());
211
- }
212
-
213
212
void ActivateTiering (const ui64 pathId, const TString& useTiering, const bool onTabletInit = false );
214
213
void OnTieringModified ();
215
214
public:
@@ -220,6 +219,41 @@ class TColumnShard
220
219
None /* "none" */
221
220
};
222
221
222
+ void IncCounter (NColumnShard::EPercentileCounters counter, const TDuration& latency) const {
223
+ TabletCounters->Percentile ()[counter].IncrementFor (latency.MicroSeconds ());
224
+ }
225
+
226
+ void IncCounter (NDataShard::ESimpleCounters counter, ui64 num = 1 ) const {
227
+ TabletCounters->Simple ()[counter].Add (num);
228
+ }
229
+
230
+ // For systable
231
+ void IncCounter (NDataShard::ECumulativeCounters counter, ui64 num = 1 ) const {
232
+ TabletCounters->Cumulative ()[counter].Increment (num);
233
+ }
234
+
235
+ void IncCounter (NDataShard::EPercentileCounters counter, ui64 num) const {
236
+ TabletCounters->Percentile ()[counter].IncrementFor (num);
237
+ }
238
+
239
+ void IncCounter (NDataShard::EPercentileCounters counter, const TDuration& latency) const {
240
+ TabletCounters->Percentile ()[counter].IncrementFor (latency.MilliSeconds ());
241
+ }
242
+
243
+ inline TRowVersion LastCompleteTxVersion () const {
244
+ return TRowVersion (LastCompletedStep, LastCompletedTxId);
245
+ }
246
+
247
+ ui32 Generation () const { return Executor ()->Generation (); }
248
+
249
+ bool IsUserTable (const TTableId&) const {
250
+ return false ;
251
+ }
252
+
253
+ const THashMap<ui64, NDataShard::TUserTable::TCPtr> &GetUserTables () const {
254
+ return Default<THashMap<ui64, NDataShard::TUserTable::TCPtr>>();
255
+ }
256
+
223
257
private:
224
258
void OverloadWriteFail (const EOverloadStatus overloadReason, const NEvWrite::TWriteData& writeData, std::unique_ptr<NActors::IEventBase>&& event, const TActorContext& ctx);
225
259
EOverloadStatus CheckOverloaded (const ui64 tableId) const ;
@@ -281,6 +315,9 @@ class TColumnShard
281
315
}
282
316
}
283
317
318
+ public:
319
+ TTabletCountersBase* TabletCounters;
320
+
284
321
private:
285
322
std::unique_ptr<TTxController> ProgressTxController;
286
323
std::unique_ptr<TOperationsManager> OperationsManager;
@@ -360,6 +397,8 @@ class TColumnShard
360
397
TWriteId LastWriteId = TWriteId{0 };
361
398
ui64 LastPlannedStep = 0 ;
362
399
ui64 LastPlannedTxId = 0 ;
400
+ ui64 LastCompletedStep = 0 ;
401
+ ui64 LastCompletedTxId = 0 ;
363
402
ui64 LastExportNo = 0 ;
364
403
365
404
ui64 OwnerPathId = 0 ;
@@ -386,7 +425,6 @@ class TColumnShard
386
425
TTablesManager TablesManager;
387
426
std::shared_ptr<TTiersManager> Tiers;
388
427
std::unique_ptr<TTabletCountersBase> TabletCountersPtr;
389
- TTabletCountersBase* TabletCounters;
390
428
std::unique_ptr<NTabletPipe::IClientCache> PipeClientCache;
391
429
std::unique_ptr<NOlap::TInsertTable> InsertTable;
392
430
std::shared_ptr<NOlap::NResourceBroker::NSubscribe::TSubscriberCounters> SubscribeCounters;
@@ -412,6 +450,7 @@ class TColumnShard
412
450
TLimits Limits;
413
451
TCompactionLimits CompactionLimits;
414
452
NOlap::TNormalizationController NormalizerController;
453
+ NDataShard::TSysLocks SysLocks;
415
454
416
455
void TryRegisterMediatorTimeCast ();
417
456
void UnregisterMediatorTimeCast ();
0 commit comments