Skip to content

Commit

Permalink
disable list on cluster mode
Browse files Browse the repository at this point in the history
  • Loading branch information
PragmaTwice committed Nov 11, 2024
1 parent c5a733c commit 8762b14
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/src/services/redis/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,12 @@ impl kv::Adapter for Adapter {
Capability {
read: true,
write: true,
list: true,
// due to limitation of Redis itself,
// on cluster mode we cannot get full list of keys via SCAN,
// so here we disable it on cluster mode to avoid confusions.
// TODO: we can perform multiple SCAN on each cluster node
// and merge the result to simulate the behavior of list here.
list: self.cluster_client.is_none(),

..Default::default()
},
Expand Down

0 comments on commit 8762b14

Please sign in to comment.