| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|\ |
|
| |\
| | |
| | | |
Fix for https://github.com/andymccurdy/redis-py/issues/1135
|
| | |
| | |
| | | |
Fix for https://github.com/andymccurdy/redis-py/issues/1135
|
|\ \ \
| |/ /
|/| | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Resolves a race condition found in the PubSubWorkerThread. Prior to this
change is was possible to receive the server's resonse to an unsubscribe
message prior to the channel/pattern being added to the
pending_unsubscribe set.
This also improves PubSubWorkerThread.stop so that the run function is
stopped immediately after the next iteration.
fixes #1150
|
|\ \ \
| | | |
| | | | |
Connection Reading Socket Error Enhancement
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
added "host":"port"
to Exception message for easy debug
Change-Id: Ifaa3bef0c8daf3dd2c60b143746b75a26c182a88
|
|\ \ \
| | | |
| | | | |
miss positional argument in README example
|
|/ / /
| | |
| | | |
raise TypeError.
|
| | | |
|
|\ \ \
| |_|/
|/| | |
Unregister socket from ready_poller
|
| | | |
|
|/ /
| |
| |
| |
| | |
It looks like there was a typo in PollSelector.close that made it
unregister from the read_poller twice instead of once from each poller.
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|\
| |
| | |
Do not leave connections in invalid state
|
| | |
|
|\ \
| | |
| | | |
Use IPPROTO_TCP constant instead of SOL_TCP constant
|
| |/ |
|
|\ \
| | |
| | | |
Fix github pull template typo
|
| |/ |
|
| |
| |
| |
| |
| |
| | |
Since Connection.disconnect() now verifies that the current process owns
the connection before shutting the socket down we can safely readd
the destructor just to make sure things are really cleaned up
|
| | |
|
| | |
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| |\ \
| | |/
| |/| |
|
| | |
| | |
| | |
| | |
| | | |
Hiredisparser and Connection — do not close socket on disconnect.
Resolves #1085
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
implementation/behavior (related to #1085).
When hiredis is installed and HiredisParser is used (implicitly),
connection can not be securily shared between process forks.
|
|/ / |
|
|\ \
| | |
| | | |
Skip 64-bit specific tests. (Closes: #899)
|
| | |
| | |
| | |
| | | |
Signed-off-by: Chris Lamb <lamby@debian.org>
|
| | |
| | |
| | |
| | |
| | | |
Fixes #969
Fixes #961
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
1022: Fix retry logic for StricRedis and PubSub
|
| | | | |
|
| | | | |
|
| | | | |
|