Merge pull request #27076 from taosdata/fix/TD-30883

feat:[TD-30883]send data if scan wal too log
This commit is contained in:
dapan1121 2024-08-08 13:44:44 +08:00 committed by GitHub
commit 2b6b196b66
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -101,6 +101,7 @@ int32_t tqScanData(STQ* pTq, STqHandle* pHandle, SMqDataRsp* pRsp, STqOffsetVal*
TSDB_CHECK_CODE(code, line, END);
qStreamSetSourceExcluded(task, pRequest->sourceExcluded);
uint64_t st = taosGetTimestampMs();
while (1) {
SSDataBlock* pDataBlock = NULL;
code = getDataBlock(task, pHandle, vgId, &pDataBlock);
@ -160,7 +161,7 @@ int32_t tqScanData(STQ* pTq, STqHandle* pHandle, SMqDataRsp* pRsp, STqOffsetVal*
pRsp->common.blockNum++;
totalRows += pDataBlock->info.rows;
if (totalRows >= tmqRowSize) {
if (totalRows >= tmqRowSize || (taosGetTimestampMs() - st > 1000)) {
break;
}
}

View File

@ -104,7 +104,7 @@ class TDTestCase:
stop_flag = 0
try:
while True:
res = consumer.poll(1)
res = consumer.poll(3)
tdSql.query('show consumers;')
consumer_info = tdSql.queryResult[0][-1]
if offset_value == "latest":