Comments (3)
@danprueitt has this issue been fully or partially mitigated in 0.25.0?
from redis-rs.
Routing will be exposed in the async cluster in the next release (
redis-rs/redis/src/cluster_async/mod.rs
Line 103 in a6df6e2
As for being able to iterate over the connections of each node - I believe that will be simple in the sync cluster connection, but not so simple in the async one, due to its disjoint structure. Again, contributions will be very much appreciated.
In any case you can get info on the structure of the cluster using CLUSTER NODES/SLOTS/SHARDS.
from redis-rs.
Not exactly a solution to this, but anyway, for reference, I was able to make something work by hashtagging my keys and obtaining a RoutingInfo
like so:
let routing_info = RoutingInfo::SingleNode(SpecificNode(Route::new(
get_slot("{my_pattern}".as_bytes()),
ReplicaOptional,
)));
(Imports are from the cluster_routing.rs
)
And then using that with the newly exposed route_command
function to call my function specifically to the correct node:
let foo_cmd = redis::cmd("SCAN")
.cursor_arg(0)
.arg("MATCH")
.arg("{my_pattern}:*")
.arg("COUNT")
.arg(1000)
.to_owned();
let my_res = my_conn.route_command(&foo_cmd, routing_info).await?;
from redis-rs.
Related Issues (20)
- release 0.25.3 missing pub/sub methods for MultiplexedConnection HOT 2
- Valkey support, fork, or transition HOT 19
- [afl/parser] error: current package believes it's in a workspace when it's not
- Feature request: Add support for USER_TCP_TIMEOUT as a socket option. HOT 1
- Multiplexed connection with backoff? HOT 6
- Expiration time integer types inconsistent with `SetExpiry` HOT 2
- TypeError: "Response type not convertible to numeric" HOT 16
- Missing stream commands HOT 4
- Err(Password authentication failed- AuthenticationFailed) HOT 5
- Is there a way to use tokio + rustls +webpki-roots ? HOT 13
- Attempt to scan binary keys returns Invalid UTF-8- TypeError HOT 2
- Redis TTL command returns overflow values on unsigned int HOT 1
- in cluster mode, tls mode is replaced after certs() is called HOT 2
- Allowing the requirement of a tcp timeout when using sentinel as well as when using redis client directly HOT 4
- How to run the tests? HOT 1
- Question: How to use redis-rs to test a redis module written in rust? HOT 3
- Porposal: New Clients sharding to connect to multiple Redis Nodes but sharding at client level HOT 6
- Program hangs when explicitly setting TlsMode::Insecure HOT 4
- crate feature json does not support NX and XX args HOT 1
- Questions: about the async implementation of watch/multi/exec support HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redis-rs.