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 bugs on multi stream and do optimization on quic stream. #732

Merged
merged 7 commits into from
Nov 16, 2023

Conversation

wanghaEMQ
Copy link
Member

  • Cancel prior aio on stream layer.
  • Add error handler when dial failed.
  • A efficient way (less memory cost) to manage the caches msgs (topic_lmq) when multistream is enabled.

Hi. after those commits. The multistream feature is more stable. Although it still could crash under benchmark.

This was referenced Nov 10, 2023
Copy link

codecov bot commented Nov 13, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e52b8be) 65.76% compared to head (fae5bf4) 65.74%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #732      +/-   ##
==========================================
- Coverage   65.76%   65.74%   -0.02%     
==========================================
  Files         119      119              
  Lines       35222    35222              
==========================================
- Hits        23163    23158       -5     
- Misses      12059    12064       +5     
Files Coverage Δ
src/mqtt/protocol/mqtt/mqtt_client.c 68.95% <ø> (+3.12%) ⬆️
src/mqtt/protocol/mqtt/mqttv5_client.c 67.61% <ø> (+1.61%) ⬆️

... and 10 files with indirect coverage changes

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

// Iterate topic lmq and send
size_t lmqsz = nni_lmq_len(s->topic_lmq);
log_debug("topic_lmq sz%ld Cached msg number%d", lmqsz, (int)(num_ptr - (char *)s));
for (int i=0; i<(int)lmqsz && (void *)num_ptr != s; ++i) {
Copy link
Member

Choose a reason for hiding this comment

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

racing in lmq?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry. I forgot to remove it

@@ -427,7 +427,10 @@ quic_stream_cb(int events, void *arg)
nni_aio_list_remove(aio);
QUIC_BUFFER *buf = nni_aio_get_input(aio, 0);
free(buf);
nni_aio_finish(aio, 0, nni_aio_count(aio));
if (rc != 0)
Copy link
Member

Choose a reason for hiding this comment

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

any elegant way?

@JaylinYu JaylinYu merged commit dae258f into main Nov 16, 2023
@JaylinYu JaylinYu deleted the wangha/quic_dev2 branch November 16, 2023 11:27
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