summaryrefslogtreecommitdiff
path: root/redis/cluster.py
Commit message (Collapse)AuthorAgeFilesLines
* commands/cluster: use pipeline to execute split commands (#2230)Utkarsh Gupta2022-06-271-50/+15
| | | | | | - allow passing target_nodes to pipeline commands - move READ_COMMANDS to commands/cluster to avoid import cycle - add types to list_or_args
* Changed dynamic_startup_nodes default value to 'True' to prevent breaking ↵Bar Shaul2022-06-271-5/+5
| | | | backward compatibility (#2251)
* Added dynamic_startup_nodes configuration to RedisCluster. (#2244)Bar Shaul2022-06-231-2/+15
| | | | | | | | | * Added dynamic_startup_nodes configuration to RedisCluster. By default, uses only the initial passed startup nodes to refresh the cluster topology. If set to true, sets the startup nodes to all of the discovered nodes. * Added RedisCluster specific options to the README file and updated CHANGES * Fixed timeout_error_topology_refresh test Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
* Reuse the old nodes' connections when a cluster topology refresh is being ↵Bar Shaul2022-06-231-11/+26
| | | | | | | | | | | | | done (#2235) * A fix was made to reuse the old nodes' connections when a cluster topology refresh is being done * Fixed RedisCluster to immediately raise AuthenticationError * Updated CHANGES * Fixed cluster async bgsave test to ignore "bgsave already in progress" error * Fixed linters
* Made sync lock consistent and added types to it (#2137)Anas2022-06-011-0/+8
| | | | | | | | | * Made sync lock consistent and added types to it * Made linters happy * Fixed cluster client lock signature Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
* Fix tests for Redis 7 (#2182)dvora-h2022-05-311-0/+1
| | | | | * fix tests * async
* async_cluster: add pipeline support (#2199)Utkarsh Gupta2022-05-301-36/+78
| | | Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
* async_cluster: add/update typing (#2195)Utkarsh Gupta2022-05-301-6/+9
| | | | | | | * async_cluster: add/update typing * async_cluster: update cleanup_kwargs with kwargs from async Connection * async_cluster: properly remove old nodes
* Fix Missing ClusterPipeline Lock (#2190)Greg Melton2022-05-301-0/+5
| | | | | | | | | | | * ClusterPipeline needs to initialize self._lock, otherwise a class instance will fail when calling get_redis_connection on the node * fix bad lint picked up from master * added change to CHANGES file * force ci build again * force ci build again
* Get command keys for subcommands (#2170)dvora-h2022-05-081-0/+1
| | | | | * parse subcommands * fix tests
* Add support for CLUSTER SHARDS (#2151)dvora-h2022-05-081-1/+25
| | | | | | | | | * Add support for CLUSTER SHARDS * linters * add docstring * linters
* Add Async RedisCluster (#2099)Utkarsh Gupta2022-05-081-137/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Copy Cluster Client, Commands, Commands Parser, Tests for asyncio * Async Cluster Tests: Async/Await * Add Async RedisCluster * cluster: use ERRORS_ALLOW_RETRY from self.__class__ * async_cluster: rework redis_connection, initialize, & close - move redis_connection from NodesManager to ClusterNode & handle all related logic in ClusterNode class - use Locks while initializing or closing - in case of error, close connections instead of instantly reinitializing - create ResourceWarning instead of manually deleting client object - use asyncio.gather to run commands/initialize/close in parallel - inline single use functions - fix test_acl_log for py3.6 * async_cluster: add types * async_cluster: add docs * docs: update sphinx & add sphinx_autodoc_typehints * async_cluster: move TargetNodesT to cluster module * async_cluster/commands: inherit commands from sync class if possible * async_cluster: add benchmark script with aredis & aioredis-cluster * async_cluster: remove logging * async_cluster: inline functions * async_cluster: manage Connection instead of Redis Client * async_cluster/commands: optimize parser * async_cluster: use ensure_future & generators for gather * async_conn: optimize * async_cluster: optimize determine_slot * async_cluster: optimize determine_nodes * async_cluster/parser: optimize _get_moveable_keys * async_cluster: inlined check_slots_coverage * async_cluster: update docstrings * async_cluster: add concurrent test & use read_response/_update_moved_slots without lock Co-authored-by: Chayim <chayim@users.noreply.github.com>
* fix execute_command() determine nodes error when no key command (#2097)suxb2012022-04-281-1/+4
|
* [CLUSTER] Fix scan command cursors & Fix scan_iter (#2054)Utkarsh Gupta2022-03-231-6/+10
| | | | | | | * cluster/scan: fix return cursor & change default node to primaries * cluster/scan_iter: fix iteration Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
* Remove verbose logging from cluster initializers (#2055)Joni Nevalainen2022-03-231-4/+0
|
* Add support for SEARCH commands in cluster (#2042)dvora-h2022-03-141-6/+41
| | | | | | | * Add support for SEARCH commands in cluster * delete json tests mark & list search commands * linters
* Add support to use certificates from string in ssl connection (#2048)dvora-h2022-03-141-0/+1
| | | | | | | | | * ssl string cert * fix async test * linters * change test name
* Add support for CLUSTER DELSLOTSRANGE (#2018)dvora-h2022-03-141-0/+2
| | | | | | | | | | | * delslotsrange * test * linters * skip test * linters
* Add support for CLUSTER ADDSLOTSRANGE (#2017)dvora-h2022-03-141-0/+1
| | | | | | | | | | | | | * add cluster addslotsrange * Add support for CLUSTER ADDSLOTSRANGE * docstring * fix test * skip test * linters
* Add cluster support for functions (#2016)dvora-h2022-03-061-0/+13
| | | | | | | | | | | | | | | | | | | * cluster support for functions * fix test_list_on_cluster mark * fix mark * cluster unstable url * fix * fix cluster url * skip tests * linters * linters
* Add support for JSON, TIMESERIES, BLOOM & GRAPH commands in cluster (#2032)dvora-h2022-03-061-1/+29
| | | Co-authored-by: Chayim <chayim@users.noreply.github.com>
* Add support for AUTH (#1929)dogukanteber2022-03-021-0/+1
| | | | | | | | | | | | | * Add support for AUTH * Fix linter error * test fix * fix test in cluster Co-authored-by: Chayim <chayim@users.noreply.github.com> Co-authored-by: Chayim I. Kirshen <c@kirshen.com> Co-authored-by: dvora-h <dvora.heller@redis.com>
* Implement locks for RedisCluster (#2013)Jake Barnwell2022-03-011-0/+67
| | | | | | | | | | | | | | | | | | | * Add support for .lock() for RedisCluster * Update changelog with lua scripting and lock() changes * Also update asyncio client .lock() doc * Add Python 3.6 back to hash verify CI (#2008) * Renaming chore as maintenance (#2015) * Add AsyncFunctionCommands (#2009) * Also update asyncio client .lock() doc Co-authored-by: Chayim <chayim@users.noreply.github.com> Co-authored-by: Andrew Chen Wang <60190294+Andrew-Chen-Wang@users.noreply.github.com> Co-authored-by: dvora-h <dvora.heller@redis.com>
* Add cluster support for scripting (#1937)Jake Barnwell2022-02-221-18/+69
| | | | | | | | | | | * Add cluster support for scripting * Fall back to connection_pool.get_encoder if necessary * Add documentation for cluster-based scripting * Add test for flush response Co-authored-by: dvora-h <dvora.heller@redis.com>
* FixingElevated CPU utilization on one node when using RedisCluster pipeline ↵Mike Shchurov2022-02-221-5/+3
| | | | (#1985)
* Fix flushdb and flushall (#1926)Meir Shpilraien (Spielrein)2022-02-071-2/+8
| | | | | | | | | | | | | | * Fix flushdb and flushall Both commands should be broadcasted to all the shards. * Support ssl_password on cluster * linter fix * change commands to run only on primary nodes Co-authored-by: Chayim I. Kirshen <c@kirshen.com> Co-authored-by: dvora-h <dvora.heller@redis.com>
* Clusters should optionally require full slot coverage (#1845)Bar Shaul2022-01-101-63/+12
|
* Documentation cleanup (#1841)Chayim2021-12-301-0/+1
|
* Retry on error exception and timeout fixes (#1821)Bar Shaul2021-12-231-52/+49
|
* Fixed MovedError, and stopped iterating through startup nodes when slots are ↵Bar Shaul2021-12-221-2/+12
| | | | fully covered (#1819)
* Added support for MONITOR in clusters (#1756)Bar Shaul2021-12-021-0/+17
|
* Improved RedisCluster's reinitialize_steps and documentation (#1765)Bar Shaul2021-12-021-7/+29
|
* Migrated targeted nodes to kwargs in Cluster Mode (#1762)Bar Shaul2021-12-011-6/+33
|
* Added black and isort (#1734)Anas2021-11-301-376/+393
|
* Pyupgrade + flynt + f-strings (#1759)Aarni Koskela2021-11-301-70/+64
| | | @akx Thank you so much for this! Thanks again for introducing me to a new tool that I'm sliding into my workflow as well.
* Adding RedisCluster client to support Redis Cluster Mode (#1660)Bar Shaul2021-11-251-0/+2066
Co-authored-by: Chayim <chayim@users.noreply.github.com> Co-authored-by: Anas <anas.el.amraoui@live.com>