1. 16 Jul, 2018 9 commits
    • antirez's avatar
      Hopefully improve commenting of #5126. · f9c84d6d
      antirez authored
      Reading the PR gave me the opportunity to better specify what the code
      was doing in places where I was not immediately sure about what was
      going on. Moreover I documented the structure in server.h so that people
      reading the header file will immediately understand what the structure
      is useful for.
      f9c84d6d
    • Oran Agra's avatar
      slave buffers were wasteful and incorrectly counted causing eviction · bf680b6f
      Oran Agra authored
      A) slave buffers didn't count internal fragmentation and sds unused space,
         this caused them to induce eviction although we didn't mean for it.
      
      B) slave buffers were consuming about twice the memory of what they actually needed.
      - this was mainly due to sdsMakeRoomFor growing to twice as much as needed each time
        but networking.c not storing more than 16k (partially fixed recently in 237a38737).
      - besides it wasn't able to store half of the new string into one buffer and the
        other half into the next (so the above mentioned fix helped mainly for small items).
      - lastly, the sds buffers had up to 30% internal fragmentation that was wasted,
        consumed but not used.
      
      C) inefficient performance due to starting from a small string and reallocing many times.
      
      what i changed:
      - creating dedicated buffers for reply list, counting their size with zmalloc_size
      - when creating a new reply node from, preallocate it to at least 16k.
      - when appending a new reply to the buffer, first fill all the unused space of the
        previous node before starting a new one.
      
      other changes:
      - expose mem_not_counted_for_evict info field for the benefit of the test suite
      - add a test to make sure slave buffers are counted correctly and that they don't cause eviction
      bf680b6f
    • zhaozhao.zz's avatar
      Streams: correctly propagate xdel if needed · 73306c6f
      zhaozhao.zz authored
      73306c6f
    • antirez's avatar
      103c5a1a
    • antirez's avatar
      Modify XINFO field from last-id to last-generated-id. · 185e0d9c
      antirez authored
      Related to #5129.
      185e0d9c
    • zhaozhao.zz's avatar
      Streams: free lp if all elements are deleted · c9324f81
      zhaozhao.zz authored
      c9324f81
    • paule's avatar
      Update dict.c · b6ce7d5d
      paule authored
      change coding style.
      b6ce7d5d
    • zhaozhao.zz's avatar
      Streams: show last id for streams and groups · b4ba5ac8
      zhaozhao.zz authored
      b4ba5ac8
    • peterpaule's avatar
      816fc6cb
  2. 15 Jul, 2018 1 commit
  3. 14 Jul, 2018 3 commits
  4. 13 Jul, 2018 5 commits
  5. 12 Jul, 2018 3 commits
  6. 10 Jul, 2018 7 commits
    • tengfeng's avatar
    • antirez's avatar
      Streams: fix typo "consumer". · 28e95c7c
      antirez authored
      28e95c7c
    • antirez's avatar
      Streams: fix new XREADGROUP sync logic. · a8c1bb31
      antirez authored
      a8c1bb31
    • antirez's avatar
      Streams: make blocking for > a truly special case. · 1a02b5f6
      antirez authored
      To simplify the semantics of blocking for a group, this commit changes
      the implementation to better match the description we provide of
      conusmer groups: blocking for > will make the consumer waiting for new
      elements in the group. However blocking for any other ID will always
      serve the local history of the consumer.
      
      However it must be noted that the > ID is actually an alias for the
      special ID ms/seq of UINT64_MAX,UINT64_MAX.
      1a02b5f6
    • antirez's avatar
      Streams: send an error to consumers blocked on non-existing group. · a71e8148
      antirez authored
      To detect when the group (or the whole key) is destroyed to send an
      error to the consumers blocked in such group is a problem, so we leave
      the consumers listening, the sysadmin is free to create or destroy
      groups assuming she/he knows what to do. However a client may be blocked
      in a given consumer group, that is later destroyed. Then the stream
      receives new elements. In that case there is no sane behavior to serve
      the consumer... but to report an error about the group no longer
      existing.
      
      More about detecting this synchronously and why it is not done:
      
      1. Normally we don't do that, we leave clients blocked for other data
      types such as lists.
      
      2. When we free a stream object there is no longer information about
      what was the key it was associated with, so while destroying the
      consumer groups we miss the info to unblock the clients in that moment.
      
      3. Objects can be reclaimed in other threads where it is no longer safe
      to do client operations.
      a71e8148
    • antirez's avatar
      Streams: fix unblocking logic into a consumer group. · 09327f11
      antirez authored
      When a client blocks for a consumer group, we don't know the actual ID
      we want to be served: other clients blocked in the same consumer group
      may be served first, so the consumer group latest delivered ID changes.
      This was not handled correctly, all the clients in the consumer group
      were unblocked without data but the first.
      09327f11
    • dejun.xdj's avatar
      Streams: fix xreadgroup crash after xgroup SETID is sent. · 3f8a3efe
      dejun.xdj authored
      For issue #5111.
      3f8a3efe
  7. 09 Jul, 2018 7 commits
  8. 04 Jul, 2018 5 commits