提交 44ee79e9 编写于 作者: A Alex Duan

[TS-1164]<fix>(query): get next_time loop death lock

上级 7822d070
......@@ -180,13 +180,13 @@ static void tscProcessStreamTimer(void *handle, void *tmrId) {
if (pStream->interval.intervalUnit == 'y' || pStream->interval.intervalUnit == 'n') {
timer = 86400 * 1000l;
} else {
int64_t next_time = 0;
int32_t loop = 10000;
int64_t next_time = pStream->stime;
while(1) {
// get next time
next_time = taosTimeAdd(pStream->stime, pStream->interval.sliding, pStream->interval.intervalUnit, TSDB_TIME_PRECISION_MILLI);
next_time = taosTimeTruncate(next_time, &pStream->interval, pStream->precision);
next_time = taosTimeAdd(next_time, pStream->interval.sliding, pStream->interval.intervalUnit, TSDB_TIME_PRECISION_MILLI);
timer = next_time - taosGetTimestamp(pStream->precision); // next time - now()
if(timer < 0 ) {
if(timer < 0 && --loop > 0 ) {
//tscDebug("CQ next time < now so loop add sliding. next_time=%" PRId64, next_time);
continue;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册