Skip to content
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 ringbuffer exchange exchange_client UT #767

Merged
merged 6 commits into from Dec 13, 2023
Merged

Fix ringbuffer exchange exchange_client UT #767

merged 6 commits into from Dec 13, 2023

Conversation

RanMaoyi
Copy link
Contributor

No description provided.

Signed-off-by: Moi Ran <maoyi.ran@emqx.io>
Signed-off-by: Moi Ran <maoyi.ran@emqx.io>
Signed-off-by: Moi Ran <maoyi.ran@emqx.io>
Signed-off-by: Moi Ran <maoyi.ran@emqx.io>
  directly

Signed-off-by: Moi Ran <maoyi.ran@emqx.io>
Signed-off-by: Moi Ran <maoyi.ran@emqx.io>
Copy link

codecov bot commented Dec 13, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (97dde16) 64.51% compared to head (d27682f) 65.78%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #767      +/-   ##
==========================================
+ Coverage   64.51%   65.78%   +1.26%     
==========================================
  Files         124      124              
  Lines       35999    35975      -24     
==========================================
+ Hits        23226    23666     +440     
+ Misses      12773    12309     -464     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@OdyWayne OdyWayne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool!

Copy link
Member

@JaylinYu JaylinYu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not nng/kernel style
but still working fine

@@ -99,6 +99,7 @@ exchange_node_send_messages_dequeue(exchange_node_t *ex_node, int **key, nni_msg
*aio = send_msg->aio;
nni_list_remove(&ex_node->send_messages, send_msg);
ex_node->send_messages_num--;
nng_free(send_msg, sizeof(*send_msg));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

???

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better use lmq here.
put aio in msg->protodata

@@ -223,6 +223,12 @@ int ringBuffer_enqueue(ringBuffer_t *rb,
}

if (rb->size == rb->cap) {
/* ringbuffer not allowed to overwrite */
if (rb->overWrite == 0) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool

@JaylinYu JaylinYu merged commit c0b469a into main Dec 13, 2023
16 checks passed
@JaylinYu JaylinYu deleted the moi_ringbuffer branch December 13, 2023 11:40
Copy link
Member

@wanghaEMQ wanghaEMQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants