Skip to content

Commit

Permalink
Merge from upstream (#132)
Browse files Browse the repository at this point in the history
* Add lock file to keep MSRV constant. (redis-rs#1039)

* [opt] preallocate buffer for evalsha in `Script` (redis-rs#1044)

* Cluster: fix read from replica & missing slots. (redis-rs#965)

* Cluster SlotMap: Allow missing slots.

The cluster can still operate when some slots don't have coverage, so
there's no reason that the connection won't work.
Requests that should be routed to missing slots will be forwarded to a
random node.

* Fix SlotAddrs not holding all replicas.

This change fixes 2 issues -
1. Since SlotAddrs saves at most 1 replica (or none, if
`read_from_replica` is false), it means that when there are 2 or more
replicas in the cluster, `AllNodes` commands aren't actually sent to
all nodes.
2. `SlotAddr::Replica` carries 2 separate semantic meanings - it could
mean that the command is a readonly command, or that the user asked to
route the command to a replica.
The first case should be affected by the `read_from_replica` client
flag, but the second case shouldn't - if the user requested that this
specific command be routed to the replica, the specific request should
override the prior configuration.

* Fix multi-slot routes/addresses mismatch.

If the `SlotMap` is partial, and some slots don't have addresses, then
we need to communicate this back when getting addresses for multi-slot
commands. Otherwise we the key indices won't match the addresses,
and commands with the wrong keys will be sent to the wrong nodes.

* fix typo

* fix redis-rs#1045: impl `Clone`/`Copy` for `SetOptions` (redis-rs#1046)

* docs: add "connection-manager" cfg attr (redis-rs#1048)

* Fix new clippy lints. (redis-rs#1052)

Replace Vec reference with a slice, and remove iterator trait when using ExactSizeIterator, since it encompasses it.

* Async cluster connection: Improve handling of missing connections (redis-rs#968)

* aio::ClusterConnection: Report missing connections.

This change should ensure that if a connection wasn't found, after
redirecting to node, or when no random connection is available, then the
cluster connection will refresh slots.

* Add sleep to refresh slots action.

* Cancel redirects after disconnects.

If a redirected request reaches a disconnected node, the redirection
will be cancelled, and the routing will revert to the original routing.

* Move OperationTarget to Err side of result, and reduce generics.

OperationTarget is used only on errors, so it should be in the `Err` case only.
The added generics were used to hide a single type.

* Handle disconnect from all nodes.

If the async cluster connection completely disconnects from all nodes in the server, it will try again to connect to the inital nodes that were provided upon creation.

This prevents a situation where the client removes connections incrementally, until the connection map is completely empty, and there are no connections to refresh slots on.

* Appease Clippy (redis-rs#1061)

* Reconnect on parsing errors.

Parsing errors mean that the connection received a response it doesn't
know how to handle. This means that it cannot make sense of the next
values sent over the connection, and the connection must be replaced.

related:
redis-rs#984 (comment)

* Save reconnected connections during retries.

This change ensures that reconnect attempts that happen during retries,
or new connections that happen after MOVED/ASKING errors, will be saved
instead of constantly reconnecting until slots are refreshed.

* [fix] make `Pipeline` handle returned bulks correctly

* Update mio dependency due to vulnerability. (redis-rs#1064)

GHSA-r8w9-5wcg-vfj7

* Simplify Sink polling logic.

This removes unnecessary `match`es and `map` from the code, and moves the usage of `poll_recover` into `poll_flush`, so as not to block new requests while trying to recover a connection.

* Remove the usage of aio::Connection in tests.

`aio::Connection` is deprecated, we should test `aio::MultiplexedConnection` instead.

* Fail CI if lock file isn't updated.

* Handle server errors in array response.

Currently server errors stop the parser and return a RedisError. This caused errors that are returned inside an array, such as transaction errors, to cause the rest of the array to not be parsed.
This is solved by adding an internal value type that includes the server errors, so when parsing to the internal value type, the array will finish parsing, and then extracting the error.

* Create a server error type.

* Separate parsing errors from general response errors.

Parsing errors are client-side errors, that are caused by bad output from the server. Response errors are server-side errors, caused by bad input from the user / client.
Parse errors cause the client to be in an unrecoverable state. response errors are OK.

* Release redis 0.25.0 / redis-test 0.4.0

* Update test version (redis-rs#1071)

* Fix ambiguity in examples

* Upgrade to socket2 0.5

* Avoid library dependency on futures-time

* Merge the `resp3` branch. (redis-rs#1058)

* Initial implementation of RESP3 (redis-rs#757)

These changes implement all RESP3 types (excluding streamed types). 
RESP3 can be enabled per connection by adding `?resp3=true` to 
connection uri. It currently supports PubSub as RESP2 PubSub support 
in library, but in future PRs it'll support handling normal commands 
and PubSub messages in one connection. Only `num-bigint` is added 
as dependency to support `BigNumber` type.

Changes made in support of redis-rs#329 and redis-rs#749

* Add RESP3 support to cluster connections. (redis-rs#1001)

* Resp3 Push Management (redis-rs#898)

* squash!

* oops!

* test invalidation in cluster && introduce client tracking options

* introduce basic PubSub functionality to MultiplexedConnection and make tokio sender unbounded channel

* fix tests & linter, make PushSender::Tokio as aio feature only

* add resp3 to ci branches and fix cluster client tracking option

* test dropping and update ci yml

* remove unsubscribe fn and introduce unsubscribing by dropping receiver.

* fix tests because RedisJson returns responses in an array when it's resp3

* override redisjson cache (it's a temp solution)

* add -skip test_module to RESP3 testing and upgrade redis 6.2.4 to 6.2.13

* test json modules with RESP3 and get json fix from main

* in redis v7 RedisJson is different with Resp3 🤔

* Implement Pub/Sub in Async Cluster & fmt & remove usage of is_err_and(stable only after v1.70)

* don't use sharded pub/sub with redis v6

* use REDIS_VERSION in env instead of using HELLO command to fetch redis version

* oops

* fix linter

* fix fmt and remove benchmark from CI

* simplify PushManager and add tokio as non-optional dependency.

* get fixes from 220c6a9

* use --test-threads=1

* override redisjson cache (it's a temp solution)

* remove get_push_manager from traits & remove push manager from aio::Connection

* remove client_tracking_options

* remove 0.21.x from rust.yml

* add tests for pushmanager

* format & move push_info into a variable

* change tests according to comments.

* apply 6.2.4 changes && fmt

* try to fix

* remove con_addr & remove pub/sub support in cluster connections

* add disconnection handling to sync, mpx, cm && test it

* remove push_manager argument from connection creation

* better docs

* add has_reply function to PushKind

* remove no response command support in mpx since it's not used in mpx pub/sub

* apply changes from redis-rs#994

* fix tests

* Use enum instead of boolean for RESP version. (redis-rs#1012)

Since there's a discussion starting about what might become RESP4, this
PR will make it easier to add more RESP versions in the future.

* Rename Value enum types in order to match Redis RESP names. (redis-rs#779)

* Rename Value::Bulk to Value::Array.

* Rename Value::Status to Value::SimpleString.

* Rename Value::Data to Value::BulkString.

* Fix debug names of values.

* fix nightly comments.

* reintroduce client tracking to tests.

* fix merge errors.

---------

Co-authored-by: Altan Özlü <5479094+altanozlu@users.noreply.github.com>

* fix flakey test

* Fix linter.

* fix cargo lock.

---------

Co-authored-by: Huxley Hu <framlog@users.noreply.github.com>
Co-authored-by: Ahmad <39441506+ahmadbky@users.noreply.github.com>
Co-authored-by: ⭐️NINIKA⭐️ <DCNick3@users.noreply.github.com>
Co-authored-by: James Lucas <jaymell@users.noreply.github.com>
Co-authored-by: framlog <framlog@gmail.com>
Co-authored-by: Neo Sun <huachuang20@gmail.com>
Co-authored-by: Dirkjan Ochtman <dirkjan@ochtman.nl>
Co-authored-by: Altan Özlü <5479094+altanozlu@users.noreply.github.com>
  • Loading branch information
9 people committed Mar 13, 2024
1 parent ea93cc1 commit b8e13d8
Show file tree
Hide file tree
Showing 28 changed files with 993 additions and 507 deletions.
20 changes: 10 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 24 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,25 @@ build:
@cargo build

test:
@echo "===================================================================="
@echo "Build all features with lock file"
@echo "===================================================================="
@RUSTFLAGS="-D warnings" cargo build --locked --all-features

@echo "===================================================================="
@echo "Testing Connection Type TCP without features"
@echo "===================================================================="
@RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=tcp RUST_BACKTRACE=1 cargo test --locked -p redis --no-default-features -- --nocapture --test-threads=1
@RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=tcp RUST_BACKTRACE=1 cargo test --locked -p redis --no-default-features -- --nocapture --test-threads=1 --skip test_module

@echo "===================================================================="
@echo "Testing Connection Type TCP with all features and RESP2"
@echo "===================================================================="
@RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=tcp RUST_BACKTRACE=1 cargo test -p redis --all-features -- --nocapture --test-threads=1 --skip test_module
@RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=tcp RUST_BACKTRACE=1 cargo test --locked -p redis --all-features -- --nocapture --test-threads=1 --skip test_module

@echo "===================================================================="
@echo "Testing Connection Type TCP with all features and RESP3"
@echo "===================================================================="
@REDISRS_SERVER_TYPE=tcp PROTOCOL=RESP3 cargo test -p redis --all-features -- --nocapture --test-threads=1 --skip test_module

@echo "===================================================================="
@echo "Testing Connection Type TCP with all features and RESP3"
Expand All @@ -21,44 +30,49 @@ test:
@echo "===================================================================="
@echo "Testing Connection Type TCP with all features and Rustls support"
@echo "===================================================================="
@RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=tcp+tls RUST_BACKTRACE=1 cargo test -p redis --all-features -- --nocapture --test-threads=1 --skip test_module
@RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=tcp+tls RUST_BACKTRACE=1 cargo test --locked -p redis --all-features -- --nocapture --test-threads=1 --skip test_module

@echo "===================================================================="
@echo "Testing Connection Type TCP with all features and native-TLS support"
@echo "===================================================================="
@RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=tcp+tls RUST_BACKTRACE=1 cargo test -p redis --features=json,tokio-native-tls-comp,connection-manager,cluster-async -- --nocapture --test-threads=1 --skip test_module
@RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=tcp+tls RUST_BACKTRACE=1 cargo test --locked -p redis --features=json,tokio-native-tls-comp,connection-manager,cluster-async -- --nocapture --test-threads=1 --skip test_module

@echo "===================================================================="
@echo "Testing Connection Type UNIX"
@echo "===================================================================="
@RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=unix RUST_BACKTRACE=1 cargo test -p redis --test parser --test test_basic --test test_types --all-features -- --test-threads=1 --skip test_module
@RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=unix RUST_BACKTRACE=1 cargo test --locked -p redis --test parser --test test_basic --test test_types --all-features -- --test-threads=1 --skip test_module

@echo "===================================================================="
@echo "Testing Connection Type UNIX SOCKETS"
@echo "===================================================================="
@RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=unix RUST_BACKTRACE=1 cargo test -p redis --all-features -- --test-threads=1 --skip test_cluster --skip test_async_cluster --skip test_module
@RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=unix RUST_BACKTRACE=1 cargo test --locked -p redis --all-features -- --test-threads=1 --skip test_cluster --skip test_async_cluster --skip test_module

@echo "===================================================================="
@echo "Testing async-std with Rustls"
@echo "===================================================================="
@RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=tcp RUST_BACKTRACE=1 cargo test -p redis --features=async-std-rustls-comp,cluster-async -- --nocapture --test-threads=1 --skip test_module
@RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=tcp RUST_BACKTRACE=1 cargo test --locked -p redis --features=async-std-rustls-comp,cluster-async -- --nocapture --test-threads=1 --skip test_module

@echo "===================================================================="
@echo "Testing async-std with native-TLS"
@echo "===================================================================="
@RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=tcp RUST_BACKTRACE=1 cargo test -p redis --features=async-std-native-tls-comp,cluster-async -- --nocapture --test-threads=1 --skip test_module
@RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=tcp RUST_BACKTRACE=1 cargo test --locked -p redis --features=async-std-native-tls-comp,cluster-async -- --nocapture --test-threads=1 --skip test_module

@echo "===================================================================="
@echo "Testing redis-test"
@echo "===================================================================="
@RUSTFLAGS="-D warnings" RUST_BACKTRACE=1 cargo test -p redis-test
@RUSTFLAGS="-D warnings" RUST_BACKTRACE=1 cargo test --locked -p redis-test


test-module:
@echo "===================================================================="
@echo "Testing RESP2 with module support enabled (currently only RedisJSON)"
@echo "===================================================================="
@RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=tcp RUST_BACKTRACE=1 cargo test --all-features test_module -- --test-threads=1
@RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=tcp RUST_BACKTRACE=1 cargo test --locked --all-features test_module -- --test-threads=1

@echo "===================================================================="
@echo "Testing RESP3 with module support enabled (currently only RedisJSON)"
@echo "===================================================================="
@RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=tcp RUST_BACKTRACE=1 RESP3=true cargo test --all-features test_module -- --test-threads=1

@echo "===================================================================="
@echo "Testing RESP3 with module support enabled (currently only RedisJSON)"
Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The crate is called `redis` and you can depend on it via cargo:

```ini
[dependencies]
redis = "0.24.0"
redis = "0.25.0"
```

Documentation on the library can be found at
Expand Down Expand Up @@ -59,10 +59,10 @@ To enable asynchronous clients, enable the relevant feature in your Cargo.toml,

```
# if you use tokio
redis = { version = "0.24.0", features = ["tokio-comp"] }
redis = { version = "0.25.0", features = ["tokio-comp"] }
# if you use async-std
redis = { version = "0.24.0", features = ["async-std-comp"] }
redis = { version = "0.25.0", features = ["async-std-comp"] }
```

## TLS Support
Expand All @@ -73,25 +73,25 @@ Currently, `native-tls` and `rustls` are supported.
To use `native-tls`:

```
redis = { version = "0.24.0", features = ["tls-native-tls"] }
redis = { version = "0.25.0", features = ["tls-native-tls"] }
# if you use tokio
redis = { version = "0.24.0", features = ["tokio-native-tls-comp"] }
redis = { version = "0.25.0", features = ["tokio-native-tls-comp"] }
# if you use async-std
redis = { version = "0.24.0", features = ["async-std-native-tls-comp"] }
redis = { version = "0.25.0", features = ["async-std-native-tls-comp"] }
```

To use `rustls`:

```
redis = { version = "0.24.0", features = ["tls-rustls"] }
redis = { version = "0.25.0", features = ["tls-rustls"] }
# if you use tokio
redis = { version = "0.24.0", features = ["tokio-rustls-comp"] }
redis = { version = "0.25.0", features = ["tokio-rustls-comp"] }
# if you use async-std
redis = { version = "0.24.0", features = ["async-std-rustls-comp"] }
redis = { version = "0.25.0", features = ["async-std-rustls-comp"] }
```

With `rustls`, you can add the following feature flags on top of other feature flags to enable additional features:
Expand All @@ -117,7 +117,7 @@ let client = redis::Client::open("rediss://127.0.0.1/#insecure")?;

Support for Redis Cluster can be enabled by enabling the `cluster` feature in your Cargo.toml:

`redis = { version = "0.24.0", features = [ "cluster"] }`
`redis = { version = "0.25.0", features = [ "cluster"] }`

Then you can simply use the `ClusterClient`, which accepts a list of available nodes. Note
that only one node in the cluster needs to be specified when instantiating the client, though
Expand All @@ -140,7 +140,7 @@ fn fetch_an_integer() -> String {
Async Redis Cluster support can be enabled by enabling the `cluster-async` feature, along
with your preferred async runtime, e.g.:

`redis = { version = "0.24.0", features = [ "cluster-async", "tokio-std-comp" ] }`
`redis = { version = "0.25.0", features = [ "cluster-async", "tokio-std-comp" ] }`

```rust
use redis::cluster::ClusterClient;
Expand All @@ -160,7 +160,7 @@ async fn fetch_an_integer() -> String {

Support for the RedisJSON Module can be enabled by specifying "json" as a feature in your Cargo.toml.

`redis = { version = "0.24.0", features = ["json"] }`
`redis = { version = "0.25.0", features = ["json"] }`

Then you can simply import the `JsonCommands` trait which will add the `json` commands to all Redis Connections (not to be confused with just `Commands` which only adds the default commands)

Expand Down
3 changes: 3 additions & 0 deletions redis-test/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 0.4.0 (2023-03-08)
* Track redis 0.25.0 release

### 0.3.0 (2023-12-05)
* Track redis 0.24.0 release

Expand Down
6 changes: 3 additions & 3 deletions redis-test/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "redis-test"
version = "0.3.0"
version = "0.4.0"
edition = "2021"
description = "Testing helpers for the `redis` crate"
homepage = "https://github.com/redis-rs/redis-rs"
Expand All @@ -13,7 +13,7 @@ rust-version = "1.65"
bench = false

[dependencies]
redis = { version = "0.24.0", path = "../redis" }
redis = { version = "0.25.0", path = "../redis" }

bytes = { version = "1", optional = true }
futures = { version = "0.3", optional = true }
Expand All @@ -22,5 +22,5 @@ futures = { version = "0.3", optional = true }
aio = ["futures", "redis/aio"]

[dev-dependencies]
redis = { version = "0.24.0", path = "../redis", features = ["aio", "tokio-comp"] }
redis = { version = "0.25.0", path = "../redis", features = ["aio", "tokio-comp"] }
tokio = { version = "1", features = ["rt", "macros", "rt-multi-thread", "time"] }
49 changes: 49 additions & 0 deletions redis/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,52 @@
### 0.25.0 (2024-03-08)

#### Features

* **Breaking change**: Add connection timeout to the cluster client ([#834](https://github.com/redis-rs/redis-rs/pull/834))
* **Breaking change**: Deprecate aio::Connection ([#889](https://github.com/redis-rs/redis-rs/pull/889))
* Cluster: fix read from replica & missing slots ([#965](https://github.com/redis-rs/redis-rs/pull/965))
* Async cluster connection: Improve handling of missing connections ([#968](https://github.com/redis-rs/redis-rs/pull/968))
* Add support for parsing to/from any sized arrays ([#981](https://github.com/redis-rs/redis-rs/pull/981))
* Upgrade to rustls 0.22 ([#1000](https://github.com/redis-rs/redis-rs/pull/1000) @djc)
* add SMISMEMBER command ([#1002](https://github.com/redis-rs/redis-rs/pull/1002) @Zacaria)
* Add support for some big number types ([#1014](https://github.com/redis-rs/redis-rs/pull/1014) @AkiraMiyakoda)
* Add Support for UUIDs ([#1029](https://github.com/redis-rs/redis-rs/pull/1029) @Rabbitminers)
* Add FromRedisValue::from_owned_redis_value to reduce copies while parsing response ([#1030](https://github.com/redis-rs/redis-rs/pull/1030) @Nathan-Fenner)
* Save reconnected connections during retries ([#1033](https://github.com/redis-rs/redis-rs/pull/1033))
* Avoid panic on connection failure ([#1035](https://github.com/redis-rs/redis-rs/pull/1035))
* add disable client setinfo feature and its default mode is off ([#1036](https://github.com/redis-rs/redis-rs/pull/1036) @Ggiggle)
* Reconnect on parsing errors ([#1051](https://github.com/redis-rs/redis-rs/pull/1051))
* preallocate buffer for evalsha in Script ([#1044](https://github.com/redis-rs/redis-rs/pull/1044) @framlog)

#### Changes

* Align more commands routings ([#938](https://github.com/redis-rs/redis-rs/pull/938))
* Fix HashMap conversion ([#977](https://github.com/redis-rs/redis-rs/pull/977) @mxbrt)
* MultiplexedConnection: Remove unnecessary allocation in send ([#990](https://github.com/redis-rs/redis-rs/pull/990))
* Tests: Reduce cluster setup flakiness ([#999](https://github.com/redis-rs/redis-rs/pull/999))
* Remove the unwrap_or! macro ([#1010](https://github.com/redis-rs/redis-rs/pull/1010))
* Remove allocation from command function ([#1008](https://github.com/redis-rs/redis-rs/pull/1008))
* Catch panics from task::spawn in tests ([#1015](https://github.com/redis-rs/redis-rs/pull/1015))
* Fix lint errors from new Rust version ([#1016](https://github.com/redis-rs/redis-rs/pull/1016))
* Fix warnings that appear only with native-TLS ([#1018](https://github.com/redis-rs/redis-rs/pull/1018))
* Hide the req_packed_commands from docs ([#1020](https://github.com/redis-rs/redis-rs/pull/1020))
* Fix documentaion error ([#1022](https://github.com/redis-rs/redis-rs/pull/1022) @rcl-viveksharma)
* Fixes minor grammar mistake in json.rs file ([#1026](https://github.com/redis-rs/redis-rs/pull/1026) @RScrusoe)
* Enable ignored pipe test ([#1027](https://github.com/redis-rs/redis-rs/pull/1027))
* Fix names of existing async cluster tests ([#1028](https://github.com/redis-rs/redis-rs/pull/1028))
* Add lock file to keep MSRV constant ([#1039](https://github.com/redis-rs/redis-rs/pull/1039))
* Fail CI if lock file isn't updated ([#1042](https://github.com/redis-rs/redis-rs/pull/1042))
* impl Clone/Copy for SetOptions ([#1046](https://github.com/redis-rs/redis-rs/pull/1046) @ahmadbky)
* docs: add "connection-manager" cfg attr ([#1048](https://github.com/redis-rs/redis-rs/pull/1048) @DCNick3)
* Remove the usage of aio::Connection in tests ([#1049](https://github.com/redis-rs/redis-rs/pull/1049))
* Fix new clippy lints ([#1052](https://github.com/redis-rs/redis-rs/pull/1052))
* Handle server errors in array response ([#1056](https://github.com/redis-rs/redis-rs/pull/1056))
* Appease Clippy ([#1061](https://github.com/redis-rs/redis-rs/pull/1061))
* make Pipeline handle returned bulks correctly ([#1063](https://github.com/redis-rs/redis-rs/pull/1063) @framlog)
* Update mio dependency due to vulnerability ([#1064](https://github.com/redis-rs/redis-rs/pull/1064))
* Simplify Sink polling logic ([#1065](https://github.com/redis-rs/redis-rs/pull/1065))
* Separate parsing errors from general response errors ([#1069](https://github.com/redis-rs/redis-rs/pull/1069))

### 0.24.0 (2023-12-05)

#### Features
Expand Down
12 changes: 6 additions & 6 deletions redis/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "redis"
version = "0.24.0"
version = "0.25.0"
keywords = ["redis", "database"]
description = "Redis driver for Rust."
homepage = "https://github.com/redis-rs/redis-rs"
Expand Down Expand Up @@ -42,7 +42,7 @@ futures-util = { version = "0.3.15", default-features = false, optional = true }
pin-project-lite = { version = "0.2", optional = true }
tokio-util = { version = "0.7", optional = true }
tokio = { version = "1", features = ["rt", "net", "time", "sync"] }
socket2 = { version = "0.4", default-features = false, optional = true }
socket2 = { version = "0.5", default-features = false, optional = true }
fast-math = { version = "0.1.1", optional = true }
dispose = { version = "0.5.0", optional = true }

Expand Down Expand Up @@ -89,13 +89,12 @@ serde_json = { version = "1.0.82", optional = true }
# Only needed for bignum Support
rust_decimal = { version = "1.33.1", optional = true }
bigdecimal = { version = "0.4.2", optional = true }
num-bigint = "0.4.4"

# Optional aHash support
ahash = { version = "0.8.6", optional = true }

num-bigint = "0.4.4"
tracing = "0.1"
futures-time = { version = "3.0.0", optional = true }
arcstr = "1.1.5"

# Optional uuid support
Expand All @@ -104,7 +103,7 @@ uuid = { version = "1.6.1", optional = true }
[features]
default = ["acl", "streams", "geospatial", "script", "keep-alive"]
acl = []
aio = ["bytes", "pin-project-lite", "futures-util", "futures-util/alloc", "futures-util/sink", "tokio/io-util", "tokio-util", "tokio-util/codec", "tokio/sync", "combine/tokio", "async-trait", "futures-time", "fast-math", "dispose"]
aio = ["bytes", "pin-project-lite", "futures-util", "futures-util/alloc", "futures-util/sink", "tokio/io-util", "tokio-util", "tokio-util/codec", "combine/tokio", "async-trait", "fast-math", "dispose"]
geospatial = []
json = ["serde", "serde/derive", "serde_json"]
cluster = ["crc16", "rand", "derivative"]
Expand Down Expand Up @@ -137,10 +136,11 @@ async-std-tls-comp = ["async-std-native-tls-comp"] # use "async-std-native-tls-c

[dev-dependencies]
rand = "0.8"
socket2 = "0.4"
socket2 = "0.5"
assert_approx_eq = "1.0"
fnv = "1.0.5"
futures = "0.3"
futures-time = "3"
criterion = "0.4"
partial-io = { version = "0.5", features = ["tokio", "quickcheck1"] }
quickcheck = "1.0.3"
Expand Down
2 changes: 1 addition & 1 deletion redis/examples/async-multiplexed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ async fn test_cmd(con: &MultiplexedConnection, i: i32) -> RedisResult<()> {
let value = format!("foo{i}");

redis::cmd("SET")
.arg(&key[..])
.arg(&key)
.arg(&value)
.query_async(&mut con)
.await?;
Expand Down
Loading

0 comments on commit b8e13d8

Please sign in to comment.