Skip to content

Commit

Permalink
temporary fix for SA tablet local db schema (ydb-platform#7459)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexd65536 authored Aug 6, 2024
1 parent e466384 commit 9c9f411
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
1 change: 1 addition & 0 deletions .github/config/muted_ya.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,4 @@ ydb/tests/functional/ydb_cli test_ydb_impex.py.TestImpex.test_big_dataset*
ydb/tests/tools/pq_read/test test_timeout.py.TestTimeout.test_timeout
ydb/tests/functional/rename [test_rename.py */*] chunk chunk
ydb/tests/fq/yt/kqp_yt_file/part18 test.py.test[pg-join_brackets2-default.txt]
ydb/tests/functional/suite_tests test_postgres.py.TestPGSQL.test_sql_suite[plan-jointest/join2.test]
2 changes: 1 addition & 1 deletion ydb/core/statistics/aggregator/aggregator_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ void TStatisticsAggregator::ScheduleNextTraversal(NIceDb::TNiceDb& db) {

PersistForceTraversal(db);

db.Table<Schema::ForceTraversals>().Key(operation.OperationId, operation.PathId.OwnerId, operation.PathId.LocalPathId).Delete();
// db.Table<Schema::ForceTraversals>().Key(operation.OperationId, operation.PathId.OwnerId, operation.PathId.LocalPathId).Delete();
ForceTraversals.pop_front();
} else if (!ScheduleTraversalsByTime.Empty()){
LastTraversalWasForce = false;
Expand Down
8 changes: 4 additions & 4 deletions ydb/core/statistics/aggregator/schema.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ struct TAggregatorSchema : NIceDb::Schema {
IsColumnTable
>;
};

/*
struct ForceTraversals : Table<5> {
struct OperationId : Column<1, NScheme::NTypeIds::Uint64> {};
struct OwnerId : Column<2, NScheme::NTypeIds::Uint64> {};
Expand All @@ -64,13 +64,13 @@ struct TAggregatorSchema : NIceDb::Schema {
Types
>;
};

*/
using TTables = SchemaTables<
SysParams,
BaseStatistics,
ColumnStatistics,
ScheduleTraversals,
ForceTraversals
ScheduleTraversals
// ForceTraversals
>;

using TSettings = SchemaSettings<
Expand Down
3 changes: 2 additions & 1 deletion ydb/core/statistics/aggregator/tx_analyze_table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ struct TStatisticsAggregator::TTxAnalyzeTable : public TTxBase {
.ReplyToActorId = ReplyToActorId
};
Self->ForceTraversals.emplace_back(operation);

/*
db.Table<Schema::ForceTraversals>().Key(Self->NextForceTraversalOperationId, pathId.OwnerId, pathId.LocalPathId).Update(
NIceDb::TUpdate<Schema::ForceTraversals::OperationId>(Self->NextForceTraversalOperationId),
NIceDb::TUpdate<Schema::ForceTraversals::OwnerId>(pathId.OwnerId),
Expand All @@ -63,6 +63,7 @@ struct TStatisticsAggregator::TTxAnalyzeTable : public TTxBase {
NIceDb::TUpdate<Schema::ForceTraversals::ColumnTags>(columnTags),
NIceDb::TUpdate<Schema::ForceTraversals::Types>(types)
);
*/
}

Self->PersistNextForceTraversalOperationId(db);
Expand Down
9 changes: 5 additions & 4 deletions ydb/core/statistics/aggregator/tx_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ struct TStatisticsAggregator::TTxInit : public TTxBase {
auto baseStatisticsRowset = db.Table<Schema::BaseStatistics>().Range().Select();
auto statisticsRowset = db.Table<Schema::ColumnStatistics>().Range().Select();
auto scheduleTraversalRowset = db.Table<Schema::ScheduleTraversals>().Range().Select();
auto forceTraversalRowset = db.Table<Schema::ForceTraversals>().Range().Select();
// auto forceTraversalRowset = db.Table<Schema::ForceTraversals>().Range().Select();

if (!sysParamsRowset.IsReady() ||
!baseStatisticsRowset.IsReady() ||
!statisticsRowset.IsReady() ||
!scheduleTraversalRowset.IsReady() ||
!forceTraversalRowset.IsReady())
!scheduleTraversalRowset.IsReady())
// !forceTraversalRowset.IsReady())
{
return false;
}
Expand Down Expand Up @@ -204,6 +204,7 @@ struct TStatisticsAggregator::TTxInit : public TTxBase {
}

// ForceTraversals
/*
{
Self->ForceTraversals.clear();
Expand Down Expand Up @@ -240,7 +241,7 @@ struct TStatisticsAggregator::TTxInit : public TTxBase {
SA_LOG_D("[" << Self->TabletID() << "] Loaded ForceTraversals: "
<< "table count# " << Self->ForceTraversals.size());
}

*/
return true;
}

Expand Down

0 comments on commit 9c9f411

Please sign in to comment.