Skip to content

Commit

Permalink
Merge f87d526 into 903c6b6
Browse files Browse the repository at this point in the history
  • Loading branch information
aavdonkin authored Oct 29, 2024
2 parents 903c6b6 + f87d526 commit fe74c5c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
10 changes: 7 additions & 3 deletions ydb/core/tx/columnshard/columnshard__init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,20 @@ bool TTxInit::Precharge(TTransactionContext& txc) {
}

bool TTxInit::ReadEverything(TTransactionContext& txc, const TActorContext& ctx) {
if (!Precharge(txc)) {
return false;
TTablesManager tManagerLocal(Self->StoragesManager, Self->TabletID());
{
TLoadTimeSignals::TLoadTimer timer = tManagerLocal.GetLoadTimeCounters()->PrechargeTimeCounters.StartGuard();
if (!Precharge(txc)) {
timer.AddLoadingFail();
return false;
}
}

NIceDb::TNiceDb db(txc.DB);
TBlobGroupSelector dsGroupSelector(Self->Info());
NOlap::TDbWrapper dbTable(txc.DB, &dsGroupSelector);
{
ACFL_DEBUG("step", "TTablesManager::Load_Start");
TTablesManager tManagerLocal(Self->StoragesManager, Self->TabletID());
{
TMemoryProfileGuard g("TTxInit/TTablesManager");
if (!tManagerLocal.InitFromDB(db)) {
Expand Down
3 changes: 2 additions & 1 deletion ydb/core/tx/columnshard/columnshard_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ TColumnShard::TColumnShard(TTabletStorageInfo* info, const TActorId& tablet)
, TTLTaskSubscription(NOlap::TTTLColumnEngineChanges::StaticTypeName(), Counters.GetSubscribeCounters())
, BackgroundController(Counters.GetBackgroundControllerCounters())
, NormalizerController(StoragesManager, Counters.GetSubscribeCounters())
, SysLocks(this) {
, SysLocks(this)
{
}

void TColumnShard::OnDetach(const TActorContext& ctx) {
Expand Down
2 changes: 2 additions & 0 deletions ydb/core/tx/columnshard/counters/common_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,15 @@ class TTableLoadTimeCounters {
NColumnShard::TLoadTimeSignals SchemaPresetLoadTimeCounters;
NColumnShard::TLoadTimeSignals TableVersionsLoadTimeCounters;
NColumnShard::TLoadTimeSignals SchemaPresetVersionsLoadTimeCounters;
NColumnShard::TLoadTimeSignals PrechargeTimeCounters;

public:
TTableLoadTimeCounters()
: TableLoadTimeCounters("Tables")
, SchemaPresetLoadTimeCounters("SchemaPreset")
, TableVersionsLoadTimeCounters("TableVersionss")
, SchemaPresetVersionsLoadTimeCounters("SchemaPresetVersions")
, PrechargeTimeCounters("Precharge")
{
}
};
Expand Down
6 changes: 6 additions & 0 deletions ydb/core/tx/columnshard/tables_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,14 @@ class TTablesManager {
ui64 TabletId = 0;

public:
friend class TTxInit;

TTablesManager(const std::shared_ptr<NOlap::IStoragesManager>& storagesManager, const ui64 tabletId);

const std::unique_ptr<TTableLoadTimeCounters>& GetLoadTimeCounters() const {
return LoadTimeCounters;
}

bool TryFinalizeDropPathOnExecute(NTable::TDatabase& dbTable, const ui64 pathId) const;
bool TryFinalizeDropPathOnComplete(const ui64 pathId);

Expand Down

0 comments on commit fe74c5c

Please sign in to comment.