提交 d69ec987 编写于 作者: M Minglei Jin

tsdb/read: reseek with try lock mutex

上级 f0e9656b
......@@ -4068,8 +4068,8 @@ static int32_t tsdbSetQueryReseek(void* pQHandle) {
int32_t code = 0;
STsdbReader* pReader = pQHandle;
taosThreadMutexLock(&pReader->readerMutex);
code = taosThreadMutexTryLock(&pReader->readerMutex);
if (code == 0) {
if (pReader->suspended) {
taosThreadMutexUnlock(&pReader->readerMutex);
return code;
......@@ -4080,6 +4080,11 @@ static int32_t tsdbSetQueryReseek(void* pQHandle) {
taosThreadMutexUnlock(&pReader->readerMutex);
return code;
} else if (code == EBUSY) {
return TSDB_CODE_VND_QUERY_BUSY;
} else {
return -1;
}
}
int32_t tsdbReaderResume(STsdbReader* pReader) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册