When more than one non-persistent tailer (any tailer without an id) are created on the same queue, only one of them will unblock.
This does not affect either persistent tailers (any tailer that has been given an id), or any tailers that participate in graphs (all tailers that particpate in graphs have an id).
Repro
The following will hang on the last line:
(let [done-1 (promise)
done-2 (promise)
q (q/queue ::tmp)
t1 (q/tailer q) ; no id given
t2 (q/tailer q) ; no id given
a (q/appender q)]
(future (deliver done-1 (q/read!! t1)))
(future (deliver done-2 (q/read!! t2)))
(Thread/sleep 1)
(q/write a {:x 1})
(= @done-2 {:x 1})
(= @done-1 {:x 1}))
The solution is to ensure all tailers have ids: non-persistent tailers receive ephemeral ids that are not passed along on the ChronicleQueue tailer constructor.
When more than one non-persistent tailer (any tailer without an id) are created on the same queue, only one of them will unblock.
This does not affect either persistent tailers (any tailer that has been given an id), or any tailers that participate in graphs (all tailers that particpate in graphs have an id).
Repro
The following will hang on the last line:
The solution is to ensure all tailers have ids: non-persistent tailers receive ephemeral ids that are not passed along on the
ChronicleQueue
tailer constructor.The user facing API does not change.