nsqd: fix new topic channel lookup/creation #217
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When an
nsqd
first sees a topic it queriesnsqlookupd
to identify any channels that the cluster might know about in order to proactively create them (in the case where there is more than one channel this prevents data loss due to timing of consumers subscribing).In #176, a regression was introduced that prevented the topic's
messagePump
state from being updated in the code path described above. This meant that annsqd
that queried and identified channels during creation of a topic would not begin writing those messages to its channels.cc @elubow @jehiah