Skip to content

Commit

Permalink
[ISSUE #7534] Use high performance concurrent set to replace copyonwr…
Browse files Browse the repository at this point in the history
…iteset (#7583)

* fix ISSUE #7534

* reformat code

* Remove the useless unit test

---------

Co-authored-by: RongtongJin <[email protected]>
  • Loading branch information
keranbingaa and RongtongJin authored Dec 1, 2023
1 parent 56e886b commit 65faea2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ public void getAllTopicList() {
topicList = TopicList.decode(content, TopicList.class);
assertThat(topicList.getTopicList()).contains("TestTopic", "TestTopic1", "TestTopic2");
}

@Test
public void registerBroker() {
// Register master broker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
package org.apache.rocketmq.remoting.protocol.body;

import java.util.Set;
import java.util.concurrent.CopyOnWriteArraySet;
import java.util.concurrent.ConcurrentHashMap;
import org.apache.rocketmq.remoting.protocol.RemotingSerializable;

public class TopicList extends RemotingSerializable {
private Set<String> topicList = new CopyOnWriteArraySet<>();
private Set<String> topicList = ConcurrentHashMap.newKeySet();
private String brokerAddr;

public Set<String> getTopicList() {
Expand Down

0 comments on commit 65faea2

Please sign in to comment.