1. 10 11月, 2015 1 次提交
    • A
      Use clientHasPendingReplies() in flushSlavesOutputBuffers() · b719eedf
      antirez 提交于
      The old version only flushed data to slaves if there were strings
      pending in the client->reply list. Now also static buffers are flushed.
      Does not help to free memory (which is the only use we have right now in
      the fuction), but is more correct conceptually, and may be used in
      other contexts.
      b719eedf
  2. 22 10月, 2015 1 次提交
    • A
      CLIENT REPLY command implemented: ON, OFF and SKIP modes. · 86f0a2ee
      antirez 提交于
      Sometimes it can be useful for clients to completely disable replies
      from the Redis server. For example when the client sends fire and forget
      commands or performs a mass loading of data, or in caching contexts
      where new data is streamed constantly. In such contexts to use server
      time and bandwidth in order to send back replies to clients, which are
      going to be ignored, is a shame.
      
      Multiple mechanisms are possible to implement such a feature. For
      example it could be a feature of MULTI/EXEC, or a command prefix
      such as "NOREPLY SADD myset foo", or a different mechanism that allows
      to switch on/off requests using the CLIENT command.
      
      The MULTI/EXEC approach has the problem that transactions are not
      strictly part of the no-reply semantics, and if we want to insert a lot
      of data in a bulk way, creating a huge MULTI/EXEC transaction in the
      server memory is bad.
      
      The prefix is the best in this specific use case since it does not allow
      desynchronizations, and is pretty clear semantically. However Redis
      internals and client libraries are not prepared to handle this
      currently.
      
      So the implementation uses the CLIENT command, providing a new REPLY
      subcommand with three options:
      
          CLIENT REPLY OFF disables the replies, and does not reply itself.
          CLIENT REPLY ON re-enables the replies, replying +OK.
          CLIENT REPLY SKIP only discards the reply of the next command, and
                            like OFF does not reply anything itself.
      
      The reason to add the SKIP command is that it allows to have an easy
      way to send conceptually "single" commands that don't need a reply
      as the sum of two pipelined commands:
      
          CLIENT REPLY SKIP
          SET key value
      
      Note that CLIENT REPLY ON replies with +OK so it should be used when
      sending multiple commands that don't need a reply. However since it
      replies with +OK the client can check that the connection is still
      active and all the previous commands were received.
      
      This is currently just into Redis "unstable" so the proposal can be
      modified or abandoned based on users inputs.
      86f0a2ee
  3. 01 10月, 2015 2 次提交
  4. 30 9月, 2015 9 次提交
  5. 06 8月, 2015 2 次提交
    • A
      flushSlavesOutputBuffers(): details clarified via comments. · 55cb64bb
      antirez 提交于
      Talking with @oranagra we had to reason a little bit to understand if
      this function could ever flush the output buffers of the wrong slaves,
      having online state but actually not being ready to receive writes
      before the first ACK is received from them (this happens with diskless
      replication).
      
      Next time we'll just read this comment.
      55cb64bb
    • A
      Replication: add REPLCONF CAPA EOF support. · 3e6d4d59
      antirez 提交于
      Add the concept of slaves capabilities to Redis, the slave now presents
      to the Redis master with a set of capabilities in the form:
      
          REPLCONF capa SOMECAPA capa OTHERCAPA ...
      
      This has the effect of setting slave->slave_capa with the corresponding
      SLAVE_CAPA macros that the master can test later to understand if it
      the slave will understand certain formats and protocols of the
      replication process. This makes it much simpler to introduce new
      replication capabilities in the future in a way that don't break old
      slaves or masters.
      
      This patch was designed and implemented together with Oran Agra
      (@oranagra).
      3e6d4d59
  6. 28 7月, 2015 3 次提交
  7. 27 7月, 2015 2 次提交
  8. 26 7月, 2015 5 次提交
  9. 25 7月, 2015 1 次提交
  10. 14 7月, 2015 1 次提交
  11. 23 6月, 2015 1 次提交
    • A
      Geo: GEOADD implementation improved, replication fixed · bb328456
      antirez 提交于
      1. We no longer use a fake client but just rewriting.
      2. We group all the inserts into a single ZADD dispatch (big speed win).
      3. As a side effect of the correct implementation, replication works.
      4. The return value of the command is now correct.
      bb328456
  12. 12 5月, 2015 1 次提交
  13. 26 4月, 2015 1 次提交
  14. 01 4月, 2015 2 次提交
    • A
      Net: improve prepareClientToWrite() error handling and comments. · 6c60526d
      antirez 提交于
      When we fail to setup the write handler it does not make sense to take
      the client around, it is missing writes: whatever is a client or a slave
      anyway the connection should terminated ASAP.
      
      Moreover what the function does exactly with its return value, and in
      which case the write handler is installed on the socket, was not clear,
      so the functions comment are improved to make the goals of the function
      more obvious.
      
      Also related to #2485.
      6c60526d
    • O
      fixes to diskless replication. · 159875b5
      Oran Agra 提交于
      master was closing the connection if the RDB transfer took long time.
      and also sent PINGs to the slave before it got the initial ACK, in which case the slave wouldn't be able to find the EOF marker.
      159875b5
  15. 30 3月, 2015 1 次提交
  16. 21 3月, 2015 2 次提交
    • A
      Net: processUnblockedClients() and clientsArePaused() minor changes. · 2b278a33
      antirez 提交于
      1. No need to set btype in processUnblockedClients(), since clients
         flagged REDIS_UNBLOCKED should have it already cleared.
      2. When putting clients in the unblocked clients list, clientsArePaused()
         should flag them with REDIS_UNBLOCKED. Not strictly needed with the
         current code but is more coherent.
      2b278a33
    • A
      Net: clientsArePaused() should not touch blocked clients. · 5fe4a231
      antirez 提交于
      When the list of unblocked clients were processed, btype was set to
      blocking type none, but the client remained flagged with REDIS_BLOCKED.
      When timeout is reached (or when the client disconnects), unblocking it
      will trigger an assertion.
      
      There is no need to process pending requests from blocked clients, so
      now clientsArePaused() just avoid touching blocked clients.
      
      Close #2467.
      5fe4a231
  17. 12 3月, 2015 1 次提交
  18. 27 2月, 2015 1 次提交
  19. 25 2月, 2015 1 次提交
  20. 20 1月, 2015 1 次提交
    • M
      Improve networking type correctness · 53c082ec
      Matt Stancliff 提交于
      read() and write() return ssize_t (signed long), not int.
      
      For other offsets, we can use the unsigned size_t type instead
      of a signed offset (since our replication offsets and buffer
      positions are never negative).
      53c082ec
  21. 23 12月, 2014 1 次提交