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

[ISSUE #7534]use a new class to replace topiclist in concurrent scene #7559

Closed
wants to merge 2 commits into from

Conversation

keranbingaa
Copy link
Contributor

fix #7534

@codecov-commenter
Copy link

Codecov Report

Attention: 10 lines in your changes are missing coverage. Please review.

Comparison is base (1be5ebc) 43.11% compared to head (fa17940) 43.10%.
Report is 1 commits behind head on develop.

Files Patch % Lines
...mq/remoting/protocol/body/ConcurrentTopicList.java 0.00% 8 Missing ⚠️
...che/rocketmq/remoting/protocol/body/TopicList.java 0.00% 1 Missing ⚠️
...he/rocketmq/tools/admin/DefaultMQAdminExtImpl.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #7559      +/-   ##
=============================================
- Coverage      43.11%   43.10%   -0.02%     
- Complexity      9708     9710       +2     
=============================================
  Files           1159     1160       +1     
  Lines          84035    84043       +8     
  Branches       10922    10922              
=============================================
- Hits           36234    36226       -8     
- Misses         43294    43304      +10     
- Partials        4507     4513       +6     

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

@@ -0,0 +1,42 @@
/*
Copy link
Contributor

Choose a reason for hiding this comment

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

这个类似乎与之前的TopicList完全一致,有什么区别吗

Copy link
Contributor Author

Choose a reason for hiding this comment

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

目前问题是原来的TopicList中改成CopyOnWriteArraySet后,在某些接口调用时,如果topic数很大会有超时的问题,但如果用原来的HashSet则不会有这个问题,新增的需要并发修改的接口则用新增的ConcurrentTopicList这个类,避免并发修改的异常,通过这种方式把两类接口区分开

Copy link
Member

Choose a reason for hiding this comment

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

如何判断是这里慢而不是 config json flush 慢呢

Copy link
Contributor Author

Choose a reason for hiding this comment

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

增加了一个单元测试证明两个类在add huge topiclist时效率的差异

@lizhanhui
Copy link
Contributor

Need metrics to verify this pull request is actually fixing the attempted bottleneck.

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.

[Bug] class Topiclist use CopyOnWriteArraySet will cause timeout
5 participants