From ae9c4a48838db6dbc356e5d1d022e8739042f933 Mon Sep 17 00:00:00 2001 From: tickduan <417921451@qq.com> Date: Mon, 7 Jun 2021 13:39:12 +0800 Subject: [PATCH] fix delay 24 hours bugs --- src/client/src/tscStream.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/client/src/tscStream.c b/src/client/src/tscStream.c index ed024e21ba..de2f0087ce 100644 --- a/src/client/src/tscStream.c +++ b/src/client/src/tscStream.c @@ -340,8 +340,12 @@ static void tscSetRetryTimer(SSqlStream *pStream, SSqlObj *pSql, int64_t timer) if (pStream->isProject) { int64_t now = taosGetTimestamp(pStream->precision); int64_t etime = now > pStream->etime ? pStream->etime : now; - - if (pStream->etime < now && now - pStream->etime > tsMaxRetentWindow) { + int64_t maxRetent = tsMaxRetentWindow * 1000; + if(pStream->precision == TSDB_TIME_PRECISION_MICRO) { + maxRetent *= 1000; + } + + if (pStream->etime < now && now - pStream->etime > maxRetent) { /* * current time window will be closed, since it too early to exceed the maxRetentWindow value */