Skip to content
Merged
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
2 changes: 2 additions & 0 deletions core/internal/storage/inmemory.go
Original file line number Diff line number Diff line change
Expand Up @@ -642,13 +642,15 @@ func (module *InMemoryStorage) deleteTopic(request *protocol.StorageRequest, req
return
}

clusterMap.consumerLock.RLock()
// Work backwards - remove the topic from consumer groups first
for _, consumerMap := range clusterMap.consumer {
consumerMap.lock.Lock()
// No need to check for existence
delete(consumerMap.topics, request.Topic)
consumerMap.lock.Unlock()
}
clusterMap.consumerLock.RUnlock()

// Now remove the topic from the broker list
clusterMap.brokerLock.Lock()
Expand Down