Merge pull request #23451 from taosdata/fix/TD-26685-3.0
fix:print log if assert & check epoch when update epoch
This commit is contained in:
commit
f76417535c
|
@ -1451,7 +1451,7 @@ static bool doUpdateLocalEp(tmq_t* tmq, int32_t epoch, const SMqAskEpRsp* pRsp)
|
||||||
bool set = false;
|
bool set = false;
|
||||||
|
|
||||||
int32_t topicNumGet = taosArrayGetSize(pRsp->topics);
|
int32_t topicNumGet = taosArrayGetSize(pRsp->topics);
|
||||||
if (topicNumGet <= 0 && epoch <= tmq->epoch) {
|
if (epoch < tmq->epoch || (epoch == tmq->epoch && topicNumGet == 0)) {
|
||||||
tscInfo("consumer:0x%" PRIx64 " no update ep epoch from %d to epoch %d, incoming topics:%d",
|
tscInfo("consumer:0x%" PRIx64 " no update ep epoch from %d to epoch %d, incoming topics:%d",
|
||||||
tmq->consumerId, tmq->epoch, epoch, topicNumGet);
|
tmq->consumerId, tmq->epoch, epoch, topicNumGet);
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -728,7 +728,7 @@ int32_t mndSchedInitSubEp(SMnode* pMnode, const SMqTopicObj* pTopic, SMqSubscrib
|
||||||
pVgEp->vgId = pVgroup->vgId;
|
pVgEp->vgId = pVgroup->vgId;
|
||||||
taosArrayPush(pSub->unassignedVgs, &pVgEp);
|
taosArrayPush(pSub->unassignedVgs, &pVgEp);
|
||||||
|
|
||||||
mDebug("init subscription %s for topic:%s assign vgId:%d", pSub->key, pTopic->name, pVgEp->vgId);
|
mInfo("init subscription %s for topic:%s assign vgId:%d", pSub->key, pTopic->name, pVgEp->vgId);
|
||||||
|
|
||||||
sdbRelease(pSdb, pVgroup);
|
sdbRelease(pSdb, pVgroup);
|
||||||
}
|
}
|
||||||
|
|
|
@ -795,7 +795,12 @@ static void *taosAsyncOutputLog(void *param) {
|
||||||
updateCron = 0;
|
updateCron = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pLogBuf->stop || pSlowBuf->stop) break;
|
if (pLogBuf->stop || pSlowBuf->stop) {
|
||||||
|
pLogBuf->lastDuration = LOG_MAX_WAIT_MSEC;
|
||||||
|
taosWriteLog(pLogBuf);
|
||||||
|
taosWriteLog(pSlowBuf);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -822,7 +827,7 @@ bool taosAssertDebug(bool condition, const char *file, int32_t line, const char
|
||||||
taosPrintTrace(flags, level, dflag, -1);
|
taosPrintTrace(flags, level, dflag, -1);
|
||||||
|
|
||||||
if (tsAssert) {
|
if (tsAssert) {
|
||||||
// taosCloseLog();
|
taosCloseLog();
|
||||||
taosMsleep(300);
|
taosMsleep(300);
|
||||||
|
|
||||||
#ifdef NDEBUG
|
#ifdef NDEBUG
|
||||||
|
|
|
@ -49,7 +49,7 @@ class TDTestCase:
|
||||||
'rowsPerTbl': 10000,
|
'rowsPerTbl': 10000,
|
||||||
'batchNum': 10,
|
'batchNum': 10,
|
||||||
'startTs': 1640966400000, # 2022-01-01 00:00:00.000
|
'startTs': 1640966400000, # 2022-01-01 00:00:00.000
|
||||||
'pollDelay': 30,
|
'pollDelay': 60,
|
||||||
'showMsg': 1,
|
'showMsg': 1,
|
||||||
'showRow': 1,
|
'showRow': 1,
|
||||||
'snapshot': 0}
|
'snapshot': 0}
|
||||||
|
|
|
@ -1678,8 +1678,8 @@ int main(int argc, char *argv[]) {
|
||||||
ASSERT(!ret);
|
ASSERT(!ret);
|
||||||
ret = sml_td18789_Test();
|
ret = sml_td18789_Test();
|
||||||
ASSERT(!ret);
|
ASSERT(!ret);
|
||||||
// ret = sml_td24070_Test();
|
ret = sml_td24070_Test();
|
||||||
// ASSERT(!ret);
|
ASSERT(!ret);
|
||||||
ret = sml_td23881_Test();
|
ret = sml_td23881_Test();
|
||||||
ASSERT(ret);
|
ASSERT(ret);
|
||||||
ret = sml_escape_Test();
|
ret = sml_escape_Test();
|
||||||
|
|
Loading…
Reference in New Issue