-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nsqd: allow unbuffered memory chan if ephemeral or deferred
In b3b29b7 / #1159 unbuffered memoryMsgChan were replaced with nil chan for both Topic and Channel if mem-queue-size=0. This inadvertently made deferred publish never work (with mem-queue-size=0), because some metadata is lost when messages go through the "backend" disk queue, instead of immediately going through the topic memory chan to the channels' deferred pqueues. The motivation for fully disabling the memoryMsgQueue for mem-queue-size=0 was to avoid excessively shuffling message order, which would happen if some messages jump instantly through the memory-queue while others take the longer way through the disk-queue. So, only allow using the memory queue in this case if really needed, for deferred messages, or for ephemeral topic or channel which just lose all messages if they all go through the no-op backend queue. Granted, mem-queue-size=0 never worked very well, in many respects.
- Loading branch information
Showing
2 changed files
with
22 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters