<HTML><BODY><div>Hi Sergey, </div><div> </div><div>I’m so sorry for saying it: but this fix is not a fix. I have to underline there were failed tests:</div><div><p>[037] replication/errinj.test.lua                     memtx           [ fail ]</p><div>[037] replication/errinj.test.lua                     vinyl              [ fail ]</div><div> </div><div>You can find it here: </div><div>https://github.com/tarantool/tarantool/runs/3322606890</div></div><div> </div><div> </div><div data-signature-widget="container"><div data-signature-widget="content"><div>--<br>Vitaliia Ioffe</div></div></div><div> </div><div> </div><blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;">Пятница, 13 августа 2021, 17:25 +03:00 от Serge Petrenko <sergepetrenko@tarantool.org>:<br> <div id=""><div class="js-helper js-readmsg-msg"><div><div id="style_16288647491946397421_BODY">upstream.lag is the delta between the moment when a row was written to<br>master's journal and the moment when it was received by the replica.<br>It's an important metric to check whether the replica has fallen too far<br>behind master.<br><br>Not all the rows coming from master have a valid time of creation. For<br>example, RAFT system messages don't have one, and we can't assign<br>correct time to them: these messages do not originate from the journal,<br>and assigning current time to them would lead to jumps in upstream.lag<br>results.<br><br>Stop updating upstream.lag for rows which don't have creation time<br>assigned.<br><br>This also fixes the flaky replication/errinj.test.lua<br>---<br><a href="https://github.com/tarantool/tarantool/tree/sp/applier-lag-fix" target="_blank">https://github.com/tarantool/tarantool/tree/sp/applier-lag-fix</a><br><br> src/box/applier.cc | 3 ++-<br> 1 file changed, 2 insertions(+), 1 deletion(-)<br><br>diff --git a/src/box/applier.cc b/src/box/applier.cc<br>index 902d0bc72..9256078e1 100644<br>--- a/src/box/applier.cc<br>+++ b/src/box/applier.cc<br>@@ -664,7 +664,8 @@ applier_read_tx_row(struct applier *applier, double timeout)<br> <br>  coio_read_xrow_timeout_xc(coio, ibuf, row, timeout);<br> <br>- applier->lag = ev_now(loop()) - row->tm;<br>+ if (row->tm > 0)<br>+ applier->lag = ev_now(loop()) - row->tm;<br>  applier->last_row_time = ev_monotonic_now(loop());<br>  return tx_row;<br> }<br>--<br>2.30.1 (Apple Git-130)</div></div></div></div></blockquote><div> </div></BODY></HTML>