mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 10:25:47 +02:00
fix: allow lock_on_hashtags with any cluster mode (#2443)
Motivation - after we submitted #2429 some smart-ass clients prevent users from accessing single-node commands like "SELECT". This PR fixes it by allowing consistent sharding based on hashtags even with cluster mode disabled. Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
parent
a11b2a941a
commit
8f454b2dea
5 changed files with 12 additions and 18 deletions
|
@ -51,10 +51,6 @@ bool ClusterConfig::IsEmulated() {
|
|||
return cluster_mode == ClusterMode::kEmulatedCluster;
|
||||
}
|
||||
|
||||
bool ClusterConfig::IsEnabledOrEmulated() {
|
||||
return IsEnabled() || IsEmulated();
|
||||
}
|
||||
|
||||
string_view ClusterConfig::KeyTag(string_view key) {
|
||||
size_t start = key.find('{');
|
||||
if (start == key.npos) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue