Sendbird patches on top of redis-py 7.1.0#29
Open
bellatoris wants to merge 10 commits into
Open
Conversation
- Add n.connection = None after releasing in inner exception handler - Clear nodes dict after releasing to allow clean retry - Add outer except BaseException handler that disconnects connections before releasing them to prevent socket data corruption - Add 0.25s sleep on exception for connection pool recovery
- Add is_supported_error() method to AbstractRetry class for checking if an error type is in the supported errors list - Update PipelineStrategy inner get_connection handler to catch BaseException - Apply backoff sleep when error is a supported retry error type - Only reinitialize nodes manager on ConnectionError/TimeoutError
347e68f to
87194d6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR contains all Sendbird-specific patches applied on top of upstream redis-py v7.1.0.
Patches included (9 commits)
1. Envoy Compatibility (c62d8c1)
EVALinstead ofSCRIPT LOAD+EVALSHAin NoScriptError fallback2. Sharded PubSub - Replica Support (03285de)
replica=Falseparameter toClusterPubSub.__init__3. Sharded PubSub - Send One by One (a9cc9eb)
4. Sharded PubSub - By Slot (a55e5d5)
5. PubSub Connection Lock (b335145)
_connection_locktoPubSub.execute_command6. BaseException Handling in Pipeline (0b6aba3)
except BaseExceptionhandler inPipelineStrategy._send_cluster_commandsn.connection = Noneand clearnodesdict in inner exception handler7. is_supported_error + Improved Error Handling (3185418)
is_supported_error()method toAbstractRetryclassget_connectionhandler to catchBaseExceptionConnectionError/TimeoutError8. repr for Debugging (22e170b)
__repr__toPipelineCommandandNodeCommandsfor easier debugging9. Version Bump (87194d6)
7.1.0+sb1(PEP 440 compliant)Tag
7.1.0.sb1- Points to the version bump commitReview Checklist
Script.__call__useseval()notscript_load()in NoScriptError handlerClusterPubSub.__init__hasreplicaparameterPubSub.execute_commandhas_connection_lockPipelineStrategy._send_cluster_commandshas outerexcept BaseExceptionAbstractRetryhasis_supported_error()methodget_connectioncatchesBaseExceptionnot just(ConnectionError, TimeoutError)7.1.0+sb1