Skip to content

Commit 5e35d35

Browse files
committed
fix tests
1 parent 3337994 commit 5e35d35

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

ydb/core/graph/shard/shard_impl.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,20 +77,23 @@ void TGraphShard::Handle(TEvSubDomain::TEvConfigure::TPtr& ev) {
7777
}
7878

7979
void TGraphShard::Handle(TEvGraph::TEvSendMetrics::TPtr& ev) {
80-
BLOG_TRACE("Handle TEvGraph::TEvSendMetrics from " << ev->Sender);
8180
TInstant now = TInstant::Seconds(TActivationContext::Now().Seconds()); // 1 second resolution
81+
BLOG_TRACE("Handle TEvGraph::TEvSendMetrics from " << ev->Sender << " now is " << now << " md.timestamp is " << MetricsData.Timestamp);
8282
if (StartTimestamp == TInstant()) {
8383
StartTimestamp = now;
8484
}
8585
if (now != MetricsData.Timestamp) {
8686
if (MetricsData.Timestamp != TInstant()) {
87+
BLOG_TRACE("Executing TxStoreMetrics");
8788
ExecuteTxStoreMetrics(std::move(MetricsData));
8889
}
90+
BLOG_TRACE("Updating md.timestamp to " << now);
8991
MetricsData.Timestamp = now;
9092
MetricsData.Values.clear();
9193
}
9294
if ((now - StartTimestamp) > DURATION_CLEAR_TRIGGER && (now - ClearTimestamp) < DURATION_CLEAR_PERIOD) {
9395
ClearTimestamp = now;
96+
BLOG_TRACE("Executing TxClearData");
9497
ExecuteTxClearData();
9598
}
9699
for (const auto& metric : ev->Get()->Record.GetMetrics()) {

ydb/core/graph/shard/tx_get_metrics.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ class TTxGetMetrics : public TTransactionBase<TGraphShard> {
3232

3333
void Complete(const TActorContext& ctx) override {
3434
BLOG_D("TTxGetMetric::Complete");
35-
BLOG_TRACE("TxGetMetrics returned " << Result.TimeSize() << " points");
36-
ctx.Send(Event->Sender, new TEvGraph::TEvMetricsResult(std::move(Result)), Event->Cookie);
35+
BLOG_TRACE("TxGetMetrics returned " << Result.TimeSize() << " points for request " << Event->Cookie);
36+
ctx.Send(Event->Sender, new TEvGraph::TEvMetricsResult(std::move(Result)), 0, Event->Cookie);
3737
}
3838
};
3939

ydb/core/graph/ut/graph_ut.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ Y_UNIT_TEST_SUITE(Graph) {
140140
Ctest << "Received result: " << response->Record.ShortDebugString() << Endl;
141141
}
142142

143+
runtime.SimulateSleep(TDuration::Seconds(1));
144+
143145
{
144146
NGraph::TEvGraph::TEvSendMetrics* event = new NGraph::TEvGraph::TEvSendMetrics();
145147
NKikimrGraph::TMetric* metric = event->Record.AddMetrics();

0 commit comments

Comments
 (0)