fix:[TD-32471]set error code to terrno if tmq_consumer_poll return NULL#29436
Merged
Conversation
fix(docs/s3): make OBS explicitly
dapan1121
reviewed
Jan 3, 2025
| tmqFreeRspWrapper(pRspWrapper); | ||
| taosFreeQitem(pRspWrapper); | ||
| if(returnVal != NULL){ | ||
| if(returnVal != NULL || terrno != 0){ |
Contributor
There was a problem hiding this comment.
terrno这种用法是不对的,不能保证在任何一个函数中不会更改terrno
| | 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 | |
| TAOS_RES* tmq_consumer_poll(tmq_t* tmq, int64_t timeout) { | ||
| if (tmq == NULL) return NULL; | ||
| int32_t lino = 0; | ||
| terrno = TSDB_CODE_SUCCESS; |
Contributor
There was a problem hiding this comment.
这种用terrno的方式不太好,最好是先定义一个code,在结束时赋值terrno
dapan1121
approved these changes
Jan 3, 2025
guanshengliang
approved these changes
Jan 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Please briefly describe the code changes in this pull request.
Checklist
Please check the items in the checklist if applicable.