Skip to content

Table stats log stable #10162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions ydb/core/tx/columnshard/engines/column_engine_logs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,14 @@ const TColumnEngineStats& TColumnEngineForLogs::GetTotalStats() {

void TColumnEngineForLogs::UpdatePortionStats(const TPortionInfo& portionInfo, EStatsUpdateType updateType,
const TPortionInfo* exPortionInfo) {
UpdatePortionStats(Counters, portionInfo, updateType, exPortionInfo);

if (IS_LOG_PRIORITY_ENABLED(NActors::NLog::PRI_DEBUG, NKikimrServices::TX_COLUMNSHARD)) {
auto before = Counters.Active();
UpdatePortionStats(Counters, portionInfo, updateType, exPortionInfo);
auto after = Counters.Active();
AFL_DEBUG(NKikimrServices::TX_COLUMNSHARD)("event", "portion_stats_updated")("type", updateType)("path_id", portionInfo.GetPathId())("portion", portionInfo.GetPortionId())("before_size", before.Bytes)("after_size", after.Bytes)("before_rows", before.Rows)("after_rows", after.Rows);
} else {
UpdatePortionStats(Counters, portionInfo, updateType, exPortionInfo);
}
const ui64 pathId = portionInfo.GetPathId();
Y_ABORT_UNLESS(pathId);
if (!PathStats.contains(pathId)) {
Expand Down
2 changes: 2 additions & 0 deletions ydb/core/tx/columnshard/engines/ya.make
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ SRCS(
defs.cpp
)

GENERATE_ENUM_SERIALIZATION(column_engine_logs.h)

PEERDIR(
contrib/libs/apache/arrow
ydb/core/base
Expand Down
3 changes: 3 additions & 0 deletions ydb/core/tx/schemeshard/schemeshard__table_stats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@ bool TTxStoreTableStats::PersistSingleStats(const TPathId& pathId,
}

TShardIdx shardIdx = Self->TabletIdToShardIdx[datashardId];
LOG_DEBUG_S(ctx, NKikimrServices::FLAT_TX_SCHEMESHARD,
"PersistSingleStats for pathId " << pathId.LocalPathId << " shard idx " << shardIdx << " data size " << dataSize << " row count " << rowCount
);
const auto* shardInfo = Self->ShardInfos.FindPtr(shardIdx);
if (!shardInfo) {
LOG_DEBUG_S(ctx, NKikimrServices::FLAT_TX_SCHEMESHARD,
Expand Down
Loading