MCPcopy Create free account
hub / github.com/apache/kvrocks / UpdateWatchedKeysManually

Method UpdateWatchedKeysManually

src/server/server.cc:2172–2182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2170}
2171
2172void 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
2184void Server::WatchKey(redis::Connection *conn, const std::vector<std::string> &keys) {
2185 std::unique_lock lock(watched_key_mutex_);

Callers 2

TryPopFromListMethod · 0.80
ExecuteUnblockedMethod · 0.80

Calls 1

endMethod · 0.80

Tested by

no test coverage detected