1. 25 3月, 2019 1 次提交
  2. 19 3月, 2019 2 次提交
  3. 18 3月, 2019 2 次提交
  4. 16 3月, 2019 1 次提交
  5. 15 3月, 2019 1 次提交
  6. 18 2月, 2019 2 次提交
  7. 12 2月, 2019 1 次提交
  8. 05 2月, 2019 2 次提交
    • A
      python2 compat · 78c181b1
      Andy McCurdy 提交于
      78c181b1
    • A
      attempt to provide only healthy connections from the pool · cfa2bc9b
      Andy McCurdy 提交于
      Adds redis.selector, a module that provides the best selector strategy
      available on the current platform. A redis.selector polls a socket to
      provide two pieces of functionality:
      
      1. Check whether data can be read from the socket. Prior versions of redis-py
      provided this behavior with just select.select(). select() has lots of
      limitations, most notably a limit of ~1024 file descriptors. Now that
      better selectors are available, this should make can_read() faster and
      able to accomodate more clients. See #1115 and #486
      
      2. Check whether a socket is ready for a command to be sent. This doubles
      as a health check. It ensures that the socket is available for writing,
      has no data to read and has no known errors. Anytime a socket is
      disconnected or hung up, data is available to be read, typically zero bytes.
      
      ConnectionPool.get_connection has been modified to ensure that connections
      it returns are connected and are ready for a command to be sent. If
      get_connection encounters a case where a socket isn't ready for a command
      the connection is reconnected and checked again.
      
      TODO: more tests for this stuff. implement EPoll and KQueue selectors.
      
      Fixes #1115
      Fixes #486
      cfa2bc9b
  9. 02 2月, 2019 4 次提交
  10. 01 2月, 2019 4 次提交
    • A
      changelog · 0dc6c50a
      Andy McCurdy 提交于
      0dc6c50a
    • A
      changelog · be2f56c2
      Andy McCurdy 提交于
      be2f56c2
    • A
      Merge branch 'pythonparser' · 2a57d14a
      Andy McCurdy 提交于
      2a57d14a
    • A
      Improve how connection pools operate in forked/child proceeses. · 4e1e7480
      Andy McCurdy 提交于
      Sometimes a process with an active connection to Redis forks and creates
      child processes taht also want to talk to Redis. Prior to this change there
      were a number of potential conflicts that could cause this to fail.
      
      Retrieving a connection from the pool and releasing a connection back
      to the pool check the current proceeses PID. If it's different than the
      PID that created the pool, reset() is called to get a fresh set of connections
      for the current process. However in doing so, pool.disconnect() was caused
      which closes the file descriptors that the parent may still be using. Further
      when the available_connections and in_use_connections lists are reset, all of
      those connections inherited from the parent are GC'd and the connection's
      `__del__` was called, which also closed the socket and file descriptor.
      
      This change prevents pool.disconnect() from being called when a pid is changed.
      It also removes the `__del__` destructor from connections. Neither of these
      are necessary or practical. Child processes still reset() their copy of the
      pool when first accessed causing their own connections to be created.
      
      `ConnectionPool.disconnect()` now checks the current process ID
      so that a child or parent can't disconnect the other's connections.
      
      Additionally, `Connection.disconnect()` now checks the current process ID
      and only calls `socket.shutdown()` if `disconnect()` is called by the same
      process that created the connection. This allows for a child process that
      inherited a connection to call `Connection.disconnect()` and not shutdown
      the parent's copy of the socket.
      
      Fixes #863
      Fixes #784
      Fixes #732
      Fixes #1085
      Fixes #504
      4e1e7480
  11. 31 1月, 2019 2 次提交
  12. 30 1月, 2019 1 次提交
  13. 29 1月, 2019 2 次提交
  14. 28 1月, 2019 12 次提交
  15. 23 1月, 2019 1 次提交
  16. 11 1月, 2019 1 次提交
  17. 10 1月, 2019 1 次提交