From c505914b0427dc1ac23323f5e7774fa0fe6563af Mon Sep 17 00:00:00 2001 From: Bomin Zhang Date: Tue, 11 Aug 2020 14:01:28 +0800 Subject: [PATCH] fix td-1114 --- src/client/src/tscStream.c | 4 ++++ tests/pytest/stream/new.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/client/src/tscStream.c b/src/client/src/tscStream.c index d0591de011..60517a2f5c 100644 --- a/src/client/src/tscStream.c +++ b/src/client/src/tscStream.c @@ -135,6 +135,10 @@ static void tscProcessStreamTimer(void *handle, void *tmrId) { etime = pStream->stime + (etime - pStream->stime) / pStream->interval * pStream->interval; } pQueryInfo->window.ekey = etime; + if (pQueryInfo->window.skey >= pQueryInfo->window.ekey) { + tscSetRetryTimer(pStream, pSql, pStream->slidingTime); + return; + } } // launch stream computing in a new thread diff --git a/tests/pytest/stream/new.py b/tests/pytest/stream/new.py index b8503f0b4e..eac93dc0e6 100644 --- a/tests/pytest/stream/new.py +++ b/tests/pytest/stream/new.py @@ -54,7 +54,7 @@ class TDTestCase: tdSql.execute("insert into tb%d values(now + %ds, %d, %d)" % (i, j, j, j)) tdLog.info("=============== step5") - tdLog.sleep(30) + tdLog.sleep(40) tdSql.waitedQuery("select * from st order by ts desc", 1, 120) v = tdSql.getData(0, 3) if v <= 51: -- GitLab