You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation (~ version 2.2.4) of BackPressuredBufferedSubscriber is a little unfair due to using 2 queues - the second queue becomes active when the back-pressured state is activated.
However pulling from 2 queues alternatively is bound to create either efficiency or fairness issues and in our case it creates fairness issues. This isn't a problem with the current implementation in general, but there are cases where it can create problems due to the secondQueue being queried after the firstQueue.
Changing the implementation to use a single queue, since the BackPressuredBufferedSubscriber is effectively unlimited, the back-pressuring being only a hint for the producer to stop. By doing this we have a better chance at preserving ordering and fairness, which is also important for the "batched subscriber" which shares the same implementation.
The current implementation (~ version 2.2.4) of
BackPressuredBufferedSubscriber
is a little unfair due to using 2 queues - the second queue becomes active when the back-pressured state is activated.However pulling from 2 queues alternatively is bound to create either efficiency or fairness issues and in our case it creates fairness issues. This isn't a problem with the current implementation in general, but there are cases where it can create problems due to the
secondQueue
being queried after thefirstQueue
.Changing the implementation to use a single queue, since the
BackPressuredBufferedSubscriber
is effectively unlimited, the back-pressuring being only a hint for the producer to stop. By doing this we have a better chance at preserving ordering and fairness, which is also important for the "batched subscriber" which shares the same implementation.EDIT: this also fixes #343.
The text was updated successfully, but these errors were encountered: