-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix:[TD-32471]set error code to terrno if tmq_consumer_poll return NULL #29436
Conversation
fix(docs/s3): make OBS explicitly
source/client/src/clientTmq.c
Outdated
}else{ | ||
returnVal = processMqRsp(tmq, pRspWrapper); | ||
} | ||
tmqFreeRspWrapper(pRspWrapper); | ||
taosFreeQitem(pRspWrapper); | ||
if(returnVal != NULL){ | ||
if(returnVal != NULL || terrno != 0){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
terrno这种用法是不对的,不能保证在任何一个函数中不会更改terrno
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -535,3 +535,6 @@ This document details the server error codes that may be encountered when using | |||
| 0x80004001 | Consumer mismatch | The vnode requested for subscription and the reassigned vnode are inconsistent, usually occurs when new consumers join the same consumer group | Internal error, not exposed to users | | |||
| 0x80004002 | Consumer closed | The consumer no longer exists | Check if it has already been closed | | |||
| 0x80004100 | Stream task not exist | The stream computing task does not exist | Check the server-side error logs | | |||
| 0x80004017 | Invalid status, please subscribe topic first | tmq status invalidate | Without calling subscribe, directly poll data | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
按顺序排好把
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
source/client/src/clientTmq.c
Outdated
@@ -2522,49 +2497,47 @@ static void* tmqHandleAllRsp(tmq_t* tmq, int64_t timeout) { | |||
} | |||
|
|||
TAOS_RES* tmq_consumer_poll(tmq_t* tmq, int64_t timeout) { | |||
if (tmq == NULL) return NULL; | |||
int32_t lino = 0; | |||
terrno = TSDB_CODE_SUCCESS; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这种用terrno的方式不太好,最好是先定义一个code,在结束时赋值terrno
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Description
Please briefly describe the code changes in this pull request.
Checklist
Please check the items in the checklist if applicable.