fix(tsdb): set reader status normal once successful taking snapshot.

This commit is contained in:
Haojun Liao 2024-04-18 13:04:22 +08:00
parent 9056a48efd
commit d5d23b0434
1 changed files with 3 additions and 1 deletions

View File

@ -4518,6 +4518,9 @@ int32_t tsdbReaderResume2(STsdbReader* pReader) {
goto _err; goto _err;
} }
// open reader failure may cause the flag alway to be READER_STATUS_SUSPEND, so we need to set it A.S.A.P
pReader->flag = READER_STATUS_NORMAL;
if (pReader->type == TIMEWINDOW_RANGE_CONTAINED) { if (pReader->type == TIMEWINDOW_RANGE_CONTAINED) {
code = doOpenReaderImpl(pReader); code = doOpenReaderImpl(pReader);
if (code != TSDB_CODE_SUCCESS) { if (code != TSDB_CODE_SUCCESS) {
@ -4548,7 +4551,6 @@ int32_t tsdbReaderResume2(STsdbReader* pReader) {
} }
} }
pReader->flag = READER_STATUS_NORMAL;
tsdbDebug("reader: %p resumed uid %" PRIu64 ", numOfTable:%" PRId32 ", in this query %s", pReader, tsdbDebug("reader: %p resumed uid %" PRIu64 ", numOfTable:%" PRId32 ", in this query %s", pReader,
pBlockScanInfo ? (*pBlockScanInfo)->uid : 0, numOfTables, pReader->idStr); pBlockScanInfo ? (*pBlockScanInfo)->uid : 0, numOfTables, pReader->idStr);
return code; return code;