Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions server/jetstream_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -4701,10 +4701,14 @@ func (s *Server) jsConsumerInfoRequest(sub *subscription, c *client, _ *Account,
return
}

js.mu.RLock()
meta := cc.meta
js.mu.RUnlock()

// Since these could wait on the Raft group lock, don't do so under the JS lock.
ourID := cc.meta.ID()
groupLeader := cc.meta.GroupLeader()
groupCreated := cc.meta.Created()
ourID := meta.ID()
groupLeader := meta.GroupLeader()
groupCreated := meta.Created()

js.mu.RLock()
isLeader, sa, ca := cc.isLeader(), js.streamAssignment(acc.Name, streamName), js.consumerAssignment(acc.Name, streamName, consumerName)
Expand Down
4 changes: 2 additions & 2 deletions server/jetstream_cluster_3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1602,10 +1602,10 @@ func TestJetStreamClusterParallelConsumerCreation(t *testing.T) {
func TestJetStreamClusterGhostEphemeralsAfterRestart(t *testing.T) {
consumerNotActiveStartInterval = time.Second
consumerNotActiveMaxInterval = time.Second
defer func() {
t.Cleanup(func() {
consumerNotActiveStartInterval = defaultConsumerNotActiveStartInterval
consumerNotActiveMaxInterval = defaultConsumerNotActiveMaxInterval
}()
})

c := createJetStreamClusterExplicit(t, "R3S", 3)
defer c.shutdown()
Expand Down