Merge pull request #24477 from taosdata/fix/fixResumeBug
fix pause/resume error
This commit is contained in:
commit
d1da8ef986
|
@ -1871,12 +1871,14 @@ int32_t mndPauseAllStreamTasks(SMnode *pMnode, STrans *pTrans, SStreamObj *pStre
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t mndPersistStreamLog(STrans *pTrans, const SStreamObj *pStream, int8_t status) {
|
static int32_t mndPersistStreamLog(STrans *pTrans, SStreamObj *pStream, int8_t status) {
|
||||||
SStreamObj streamObj = {0};
|
// SStreamObj streamObj = {0};
|
||||||
memcpy(streamObj.name, pStream->name, TSDB_STREAM_FNAME_LEN);
|
// memcpy(streamObj.name, pStream->name, TSDB_STREAM_FNAME_LEN);
|
||||||
streamObj.status = status;
|
taosWLockLatch(&pStream->lock);
|
||||||
|
pStream->status = status;
|
||||||
|
SSdbRaw *pCommitRaw = mndStreamActionEncode(pStream);
|
||||||
|
|
||||||
SSdbRaw *pCommitRaw = mndStreamActionEncode(&streamObj);
|
taosWUnLockLatch(&pStream->lock);
|
||||||
if (pCommitRaw == NULL) return -1;
|
if (pCommitRaw == NULL) return -1;
|
||||||
if (mndTransAppendCommitlog(pTrans, pCommitRaw) != 0) {
|
if (mndTransAppendCommitlog(pTrans, pCommitRaw) != 0) {
|
||||||
mError("stream trans:%d, failed to append commit log since %s", pTrans->id, terrstr());
|
mError("stream trans:%d, failed to append commit log since %s", pTrans->id, terrstr());
|
||||||
|
@ -2378,7 +2380,6 @@ static int32_t mndProcessVgroupChange(SMnode *pMnode, SVgroupChangeInfo *pChange
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
pIter = sdbFetch(pSdb, SDB_STREAM, pIter, (void **)&pStream);
|
pIter = sdbFetch(pSdb, SDB_STREAM, pIter, (void **)&pStream);
|
||||||
if (pIter == NULL) {
|
if (pIter == NULL) {
|
||||||
|
@ -2935,8 +2936,8 @@ static SStreamTask *mndGetStreamTask(STaskId *pId, SStreamObj *pStream) {
|
||||||
//
|
//
|
||||||
// if (numOfReady > 0) {
|
// if (numOfReady > 0) {
|
||||||
// mDebug("stream:0x%" PRIx64
|
// mDebug("stream:0x%" PRIx64
|
||||||
// " %d tasks are ready, %d tasks in stream-scan-history for more than 50s, drop related fill-history task",
|
// " %d tasks are ready, %d tasks in stream-scan-history for more than 50s, drop related fill-history
|
||||||
// pTaskEntry->id.streamId, numOfReady, numOfTotal - numOfReady);
|
// task", pTaskEntry->id.streamId, numOfReady, numOfTotal - numOfReady);
|
||||||
// return true;
|
// return true;
|
||||||
// } else {
|
// } else {
|
||||||
// return false;
|
// return false;
|
||||||
|
|
Loading…
Reference in New Issue