aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsnaury <snaury@ydb.tech>2022-07-08 12:05:59 +0300
committersnaury <snaury@ydb.tech>2022-07-08 12:05:59 +0300
commit17bb5c88441700bb535b58b7de74b98d37948abc (patch)
tree48323a9efcc4c1a43db3c822bf57a8127013fb60
parent2be2c2e5e719446c152ece087ff13f9c3dec0c92 (diff)
downloadydb-17bb5c88441700bb535b58b7de74b98d37948abc.tar.gz
Fix incorrect StatsMaxExecuteTime,
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__table_stats.cpp4
-rw-r--r--ydb/core/tx/schemeshard/schemeshard_impl.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/ydb/core/tx/schemeshard/schemeshard__table_stats.cpp b/ydb/core/tx/schemeshard/schemeshard__table_stats.cpp
index 147c4cd8206..5e5cdef9efd 100644
--- a/ydb/core/tx/schemeshard/schemeshard__table_stats.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard__table_stats.cpp
@@ -128,7 +128,7 @@ bool TTxStorePartitionStats::Execute(TTransactionContext& txc, const TActorConte
if (Self->StatsQueue.empty())
return true;
- NCpuTime::TCpuTimer timer;
+ TMonotonic start = TMonotonic::Now();
const ui32 maxBatchSize = Self->StatsMaxBatchSize ? Self->StatsMaxBatchSize : 1;
ui32 batchSize = 0;
@@ -137,7 +137,7 @@ bool TTxStorePartitionStats::Execute(TTransactionContext& txc, const TActorConte
if (!PersistSingleStats(txc, ctx))
break;
- if (timer.GetTime() >= Self->StatsMaxExecuteTime)
+ if ((TMonotonic::Now() - start) >= Self->StatsMaxExecuteTime)
break;
}
diff --git a/ydb/core/tx/schemeshard/schemeshard_impl.cpp b/ydb/core/tx/schemeshard/schemeshard_impl.cpp
index cfbcf79398e..061abc0251d 100644
--- a/ydb/core/tx/schemeshard/schemeshard_impl.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard_impl.cpp
@@ -6121,7 +6121,7 @@ void TSchemeShard::ApplyConsoleConfigs(const NKikimrConfig::TFeatureFlags& featu
void TSchemeShard::ConfigureStatsBatching(const NKikimrConfig::TSchemeShardConfig& config, const TActorContext& ctx) {
StatsBatchTimeout = TDuration::MilliSeconds(config.GetStatsBatchTimeoutMs());
StatsMaxBatchSize = config.GetStatsMaxBatchSize();
- StatsMaxExecuteTime = TDuration::MicroSeconds(config.GetStatsMaxExecuteMs());
+ StatsMaxExecuteTime = TDuration::MilliSeconds(config.GetStatsMaxExecuteMs());
LOG_NOTICE_S(ctx, NKikimrServices::FLAT_TX_SCHEMESHARD,
"StatsBatching config: StatsBatchTimeout# " << StatsBatchTimeout
<< ", StatsMaxBatchSize# " << StatsMaxBatchSize