From: Steven Baltakatei Sandoval Date: Tue, 14 Jul 2020 01:03:27 +0000 (+0000) Subject: doc(bklog-plan):Add TODO task: correct drift of SECONDS X-Git-Url: https://zdv2.bktei.com/gitweb/EVA-2020-02.git/commitdiff_plain/89c5dead8a4eaba8408cdc6ad8c16a5ee9e02585 doc(bklog-plan):Add TODO task: correct drift of SECONDS --- diff --git a/exec/bklog-plan.org b/exec/bklog-plan.org index 9908efb..9e5e54d 100644 --- a/exec/bklog-plan.org +++ b/exec/bklog-plan.org @@ -53,6 +53,19 @@ in seconds between ~bufferTimestampOld~ and ~bufferTimestampNew~ may be calculated and an appropriate duration string generated from the ~timeDuration()~ function. +** TODO Update ~SECONDS~ variable during while read loop +2020-07-14T00:58Z; bktei> The starting timestamps of each output file +still drifts against system time. Although the ~while read~ loop does +not lose data, the drift causes the output files to be named weirdly. +A possible solution is to correct the ~SECONDS~ variable against the +current system time. Because ~date~ calls are slow, this correction +should not be made after every line. At a minimum, the correction +should occur once per buffer round, possibly after the buffer round +has completed. If more frequent corrections are required, then the +number of lines being read in each buffer round should be tracked and +a modulus comparison may be implemented within the ~while read~ loop +so that a correction is made after some fraction of the expected lines +to be read are read. * bklog narrative