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:
Roman Gershman 2024-01-19 23:44:24 +02:00 committed by GitHub
parent a11b2a941a
commit 8f454b2dea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 12 additions and 18 deletions

View file

@ -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) {