fix:add macro ASSERT_NOT_CORE to control ASSERT not core in release version
This commit is contained in:
parent
6a0e994169
commit
be4e47e9a7
|
@ -1860,8 +1860,8 @@ static int32_t tmqHandleNoPollRsp(tmq_t* tmq, SMqRspWrapper* rspWrapper, bool* p
|
||||||
static void updateVgInfo(SMqClientVg* pVg, STqOffsetVal* reqOffset, STqOffsetVal* rspOffset, int64_t sver, int64_t ever, int64_t consumerId){
|
static void updateVgInfo(SMqClientVg* pVg, STqOffsetVal* reqOffset, STqOffsetVal* rspOffset, int64_t sver, int64_t ever, int64_t consumerId){
|
||||||
if (!pVg->seekUpdated) {
|
if (!pVg->seekUpdated) {
|
||||||
tscDebug("consumer:0x%" PRIx64" local offset is update, since seekupdate not set", consumerId);
|
tscDebug("consumer:0x%" PRIx64" local offset is update, since seekupdate not set", consumerId);
|
||||||
if(reqOffset->type != 0) pVg->offsetInfo.beginOffset = *reqOffset;
|
pVg->offsetInfo.beginOffset = *reqOffset;
|
||||||
if(rspOffset->type != 0) pVg->offsetInfo.endOffset = *rspOffset;
|
pVg->offsetInfo.endOffset = *rspOffset;
|
||||||
} else {
|
} else {
|
||||||
tscDebug("consumer:0x%" PRIx64" local offset is NOT update, since seekupdate is set", consumerId);
|
tscDebug("consumer:0x%" PRIx64" local offset is NOT update, since seekupdate is set", consumerId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7207,6 +7207,9 @@ bool tOffsetEqual(const STqOffsetVal *pLeft, const STqOffsetVal *pRight) {
|
||||||
return pLeft->uid == pRight->uid && pLeft->ts == pRight->ts;
|
return pLeft->uid == pRight->uid && pLeft->ts == pRight->ts;
|
||||||
} else if (pLeft->type == TMQ_OFFSET__SNAPSHOT_META) {
|
} else if (pLeft->type == TMQ_OFFSET__SNAPSHOT_META) {
|
||||||
return pLeft->uid == pRight->uid;
|
return pLeft->uid == pRight->uid;
|
||||||
|
} else {
|
||||||
|
uError("offset type:%d", pLeft->type);
|
||||||
|
ASSERT(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -1168,7 +1168,7 @@ static int32_t buildResult(SSDataBlock *pBlock, int32_t* numOfRows, int64_t cons
|
||||||
pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);
|
pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);
|
||||||
colDataSetVal(pColInfo, *numOfRows, (const char *)consumerIdHex, consumerId == -1);
|
colDataSetVal(pColInfo, *numOfRows, (const char *)consumerIdHex, consumerId == -1);
|
||||||
|
|
||||||
mDebug("mnd show subscriptions: topic %s, consumer:0x%" PRIx64 " cgroup %s vgid %d", varDataVal(topic),
|
mInfo("mnd show subscriptions: topic %s, consumer:0x%" PRIx64 " cgroup %s vgid %d", varDataVal(topic),
|
||||||
consumerId, varDataVal(cgroup), pVgEp->vgId);
|
consumerId, varDataVal(cgroup), pVgEp->vgId);
|
||||||
|
|
||||||
// offset
|
// offset
|
||||||
|
|
|
@ -348,6 +348,7 @@ int32_t tqExtractDataForMq(STQ* pTq, STqHandle* pHandle, const SMqPollReq* pRequ
|
||||||
// the offset value can not be monotonious increase??
|
// the offset value can not be monotonious increase??
|
||||||
offset = reqOffset;
|
offset = reqOffset;
|
||||||
} else {
|
} else {
|
||||||
|
uError("req offset type is 0");
|
||||||
return TSDB_CODE_TMQ_INVALID_MSG;
|
return TSDB_CODE_TMQ_INVALID_MSG;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,13 @@ if (DEFINED GRANT_CFG_INCLUDE_DIR)
|
||||||
add_definitions(-DGRANTS_CFG)
|
add_definitions(-DGRANTS_CFG)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
IF (${ASSERT_NOT_CORE})
|
||||||
|
ADD_DEFINITIONS(-DASSERT_NOT_CORE)
|
||||||
|
MESSAGE(STATUS "disable assert core")
|
||||||
|
ELSE ()
|
||||||
|
MESSAGE(STATUS "enable assert core")
|
||||||
|
ENDIF (${ASSERT_NOT_CORE})
|
||||||
|
|
||||||
target_include_directories(
|
target_include_directories(
|
||||||
util
|
util
|
||||||
PUBLIC "${TD_SOURCE_DIR}/include/util"
|
PUBLIC "${TD_SOURCE_DIR}/include/util"
|
||||||
|
|
|
@ -76,7 +76,11 @@ static int32_t tsDaylightActive; /* Currently in daylight saving time. */
|
||||||
|
|
||||||
bool tsLogEmbedded = 0;
|
bool tsLogEmbedded = 0;
|
||||||
bool tsAsyncLog = true;
|
bool tsAsyncLog = true;
|
||||||
|
#ifdef ASSERT_NOT_CORE
|
||||||
|
bool tsAssert = false;
|
||||||
|
#else
|
||||||
bool tsAssert = true;
|
bool tsAssert = true;
|
||||||
|
#endif
|
||||||
int32_t tsNumOfLogLines = 10000000;
|
int32_t tsNumOfLogLines = 10000000;
|
||||||
int32_t tsLogKeepDays = 0;
|
int32_t tsLogKeepDays = 0;
|
||||||
LogFp tsLogFp = NULL;
|
LogFp tsLogFp = NULL;
|
||||||
|
|
Loading…
Reference in New Issue