Skip to content

Conversation

zhaohaihang
Copy link

fix #1492

  • When a client sends messages to multiple topics, the statistics information can only output the results of one topic for a single client.

* When a client sends messages to multiple topics, the statistics information can only output the results of one topic for a single client.
@zhaohaihang zhaohaihang changed the title nsqd: Fix an issue where a client sending messages to multiple topics is unable to aggregate statistics for all topics #1492 nsqd: Fix an issue where a client sending messages to multiple topics is unable to aggregate statistics for all topics Sep 2, 2024
@zhaohaihang
Copy link
Author

ready for review

Copy link
Member

@mreiferson mreiferson left a comment

Choose a reason for hiding this comment

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

Looked through the code in more detail, there's another bug (I think) that will break with this fix.

https://github.com/nsqio/nsq/blob/master/nsqd/stats.go#L154 needs to be t rather than topic.

Topic: topic,
Count: count,
})
break
Copy link
Member

Choose a reason for hiding this comment

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

we should keep the break when topicName is not empty.

@mreiferson mreiferson changed the title nsqd: Fix an issue where a client sending messages to multiple topics is unable to aggregate statistics for all topics nsqd: statistics aren't recorded when client publishes to multiple topics Oct 6, 2024
@mreiferson mreiferson added the bug label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nsqd: statistics aren't recorded when client publishes to multiple topics
2 participants