未验证 提交 c849d5ee 编写于 作者: M Minglei Jin 提交者: GitHub

Merge pull request #10211 from taosdata/fix/TS-1164-M

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