• Sascha Roland's avatar
    #5299 Fix blocking XREAD for streams that ran dry · eea0d3c5
    Sascha Roland authored
    The conclusion, that a xread request can be answered syncronously in
    case that the stream's last_id is larger than the passed last-received-id
    parameter, assumes, that there must be entries present, which could be
    returned immediately.
    This assumption fails for empty streams that actually contained some
    entries which got removed by xdel, ... .
    
    As result, the client is answered synchronously with an empty result,
    instead of blocking for new entries to arrive.
    An additional check for a non-empty stream is required.
    eea0d3c5
t_stream.c 94.7 KB