Correct out-of-date comment

pull/2276/head
Philip O'Toole 2015-04-14 13:15:54 -07:00
parent b0ee5d0a78
commit c9ea5f13de
1 changed files with 1 additions and 2 deletions

View File

@ -542,12 +542,11 @@ func (b *Broker) SetTopicMaxIndex(topicID, index uint64, u url.URL) error {
func (b *Broker) applySetTopicMaxIndex(m *Message) { func (b *Broker) applySetTopicMaxIndex(m *Message) {
topicID, index, u := unmarshalTopicIndex(m.Data) topicID, index, u := unmarshalTopicIndex(m.Data)
// Set index if it's not already set higher. // Track the highest replicated index for the topic, per data node URL.
if t := b.topics[topicID]; t != nil { if t := b.topics[topicID]; t != nil {
t.mu.Lock() t.mu.Lock()
defer t.mu.Unlock() defer t.mu.Unlock()
// Track the highest replicated index per data node URL
t.indexByURL[u] = index t.indexByURL[u] = index
} }
} }