| 2170 | } |
| 2171 | |
| 2172 | void Server::UpdateWatchedKeysManually(const std::vector<std::string> &keys) { |
| 2173 | std::shared_lock lock(watched_key_mutex_); |
| 2174 | |
| 2175 | for (const auto &key : keys) { |
| 2176 | if (auto iter = watched_key_map_.find(key); iter != watched_key_map_.end()) { |
| 2177 | for (auto *conn : iter->second) { |
| 2178 | conn->watched_keys_modified = true; |
| 2179 | } |
| 2180 | } |
| 2181 | } |
| 2182 | } |
| 2183 | |
| 2184 | void Server::WatchKey(redis::Connection *conn, const std::vector<std::string> &keys) { |
| 2185 | std::unique_lock lock(watched_key_mutex_); |
no test coverage detected