Merge pull request #22678 from taosdata/fix/TD-26042

fix:coredump if saved epoch bigger than request epoch & modify test c…
This commit is contained in:
wade zhang 2023-08-31 18:50:24 +08:00 committed by GitHub
commit 371f6ab7f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -210,8 +210,8 @@ static int32_t extractDataAndRspForDbStbSubscribe(STQ* pTq, STqHandle* pHandle,
// uint64_t st = taosGetTimestampMs(); // uint64_t st = taosGetTimestampMs();
int totalRows = 0; int totalRows = 0;
while (1) { while (1) {
int32_t savedEpoch = atomic_load_32(&pHandle->epoch); // int32_t savedEpoch = atomic_load_32(&pHandle->epoch);
ASSERT (savedEpoch <= pRequest->epoch); // ASSERT (savedEpoch <= pRequest->epoch);
if (tqFetchLog(pTq, pHandle, &fetchVer, pRequest->reqId) < 0) { if (tqFetchLog(pTq, pHandle, &fetchVer, pRequest->reqId) < 0) {
tqOffsetResetToLog(&taosxRsp.rspOffset, fetchVer); tqOffsetResetToLog(&taosxRsp.rspOffset, fetchVer);

View File

@ -205,7 +205,7 @@ class TDTestCase:
tdLog.exit("show consumers %d not equal expect num: %d"%(topicNum, expectConsumerNUm)) tdLog.exit("show consumers %d not equal expect num: %d"%(topicNum, expectConsumerNUm))
flag = 0 flag = 0
for i in range(10): while (1):
tdSql.query('show subscriptions;') tdSql.query('show subscriptions;')
subscribeNum = tdSql.queryRows subscribeNum = tdSql.queryRows
tdLog.info(" get subscriptions count: %d"%(subscribeNum)) tdLog.info(" get subscriptions count: %d"%(subscribeNum))