Skip to content

Commit

Permalink
create sys topic in all nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
or-else committed Jun 2, 2023
1 parent e4d2ef5 commit 66958e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions server/db/mongodb/tests/mongo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ func TestSubsForTopic(t *testing.T) {

func TestFindUsers(t *testing.T) {
reqTags := [][]string{{"alice", "bob", "carol"}}
gotSubs, err := adp.FindUsers(types.ParseUserId("usr"+users[2].Id), reqTags, nil)
gotSubs, err := adp.FindUsers(types.ParseUserId("usr"+users[2].Id), reqTags, nil, true)
if err != nil {
t.Error(err)
}
Expand All @@ -534,7 +534,7 @@ func TestFindUsers(t *testing.T) {

func TestFindTopics(t *testing.T) {
reqTags := [][]string{{"travel", "qwer", "asdf", "zxcv"}}
gotSubs, err := adp.FindTopics(reqTags, nil)
gotSubs, err := adp.FindTopics(reqTags, nil, true)
if err != nil {
t.Error(err)
}
Expand Down
6 changes: 2 additions & 4 deletions server/hub.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,8 @@ func newHub() *Hub {

go h.run()

if !globals.cluster.isRemoteTopic("sys") {
// Initialize system 'sys' topic. There is only one sys topic per cluster.
h.join <- &ClientComMessage{RcptTo: "sys", Original: "sys"}
}
// Initialize 'sys' topic. It will be initialized either as master or proxy.
h.join <- &ClientComMessage{RcptTo: "sys", Original: "sys"}

return h
}
Expand Down

0 comments on commit 66958e5

Please sign in to comment.