other: add some logs for drop streams.
This commit is contained in:
parent
973ca3be80
commit
9c39d11ea0
|
@ -1236,7 +1236,7 @@ static int32_t mndProcessDropStreamReq(SRpcMsg *pReq) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pStream->smaId != 0) {
|
if (pStream->smaId != 0) {
|
||||||
mDebug("stream:%s try to drop sma related stream", dropReq.name);
|
mDebug("stream:%s, uid:0x%"PRIx64" try to drop sma related stream", dropReq.name, pStream->uid);
|
||||||
|
|
||||||
void *pIter = NULL;
|
void *pIter = NULL;
|
||||||
SSmaObj *pSma = NULL;
|
SSmaObj *pSma = NULL;
|
||||||
|
@ -1250,8 +1250,8 @@ static int32_t mndProcessDropStreamReq(SRpcMsg *pReq) {
|
||||||
tFreeMDropStreamReq(&dropReq);
|
tFreeMDropStreamReq(&dropReq);
|
||||||
terrno = TSDB_CODE_TSMA_MUST_BE_DROPPED;
|
terrno = TSDB_CODE_TSMA_MUST_BE_DROPPED;
|
||||||
|
|
||||||
mError("try to drop sma-related stream:%s, code:%s only allowed to be dropped along with sma", dropReq.name,
|
mError("try to drop sma-related stream:%s, uid:0x%" PRIx64 " code:%s only allowed to be dropped along with sma",
|
||||||
tstrerror(terrno));
|
dropReq.name, pStream->uid, tstrerror(terrno));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1279,7 +1279,7 @@ static int32_t mndProcessDropStreamReq(SRpcMsg *pReq) {
|
||||||
|
|
||||||
STrans *pTrans = doCreateTrans(pMnode, pStream, pReq, TRN_CONFLICT_NOTHING, MND_STREAM_DROP_NAME, "drop stream");
|
STrans *pTrans = doCreateTrans(pMnode, pStream, pReq, TRN_CONFLICT_NOTHING, MND_STREAM_DROP_NAME, "drop stream");
|
||||||
if (pTrans == NULL) {
|
if (pTrans == NULL) {
|
||||||
mError("stream:%s, failed to drop since %s", dropReq.name, terrstr());
|
mError("stream:%s uid:0x%"PRIx64" failed to drop since %s", dropReq.name, terrstr());
|
||||||
sdbRelease(pMnode->pSdb, pStream);
|
sdbRelease(pMnode->pSdb, pStream);
|
||||||
tFreeMDropStreamReq(&dropReq);
|
tFreeMDropStreamReq(&dropReq);
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -1289,7 +1289,7 @@ static int32_t mndProcessDropStreamReq(SRpcMsg *pReq) {
|
||||||
|
|
||||||
// drop all tasks
|
// drop all tasks
|
||||||
if (mndStreamSetDropAction(pMnode, pTrans, pStream) < 0) {
|
if (mndStreamSetDropAction(pMnode, pTrans, pStream) < 0) {
|
||||||
mError("stream:%s, failed to drop task since %s", dropReq.name, terrstr());
|
mError("stream:%s uid:0x%" PRIx64 " failed to drop task since %s", dropReq.name, pStream->uid, terrstr());
|
||||||
sdbRelease(pMnode->pSdb, pStream);
|
sdbRelease(pMnode->pSdb, pStream);
|
||||||
mndTransDrop(pTrans);
|
mndTransDrop(pTrans);
|
||||||
tFreeMDropStreamReq(&dropReq);
|
tFreeMDropStreamReq(&dropReq);
|
||||||
|
@ -1315,11 +1315,13 @@ static int32_t mndProcessDropStreamReq(SRpcMsg *pReq) {
|
||||||
// kill the related checkpoint trans
|
// kill the related checkpoint trans
|
||||||
int32_t transId = mndStreamGetRelTrans(pMnode, pStream->uid);
|
int32_t transId = mndStreamGetRelTrans(pMnode, pStream->uid);
|
||||||
if (transId != 0) {
|
if (transId != 0) {
|
||||||
mDebug("drop active related transId:%d due to stream:%s dropped", transId, pStream->name);
|
mDebug("drop active transId:%d due to stream:%s uid:0x%" PRIx64 " dropped", transId, pStream->name, pStream->uid);
|
||||||
mndKillTransImpl(pMnode, transId, pStream->sourceDb);
|
mndKillTransImpl(pMnode, transId, pStream->sourceDb);
|
||||||
}
|
}
|
||||||
|
|
||||||
mDebug("stream:%s transId:%d start to drop related task when dropping stream", dropReq.name, transId);
|
mDebug("stream:%s uid:0x%" PRIx64 " transId:%d start to drop related task when dropping stream", dropReq.name,
|
||||||
|
pStream->uid, transId);
|
||||||
|
|
||||||
removeStreamTasksInBuf(pStream, &execInfo);
|
removeStreamTasksInBuf(pStream, &execInfo);
|
||||||
|
|
||||||
SName name = {0};
|
SName name = {0};
|
||||||
|
|
Loading…
Reference in New Issue