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

Method UpdateWatchedKeysFromArgs

src/server/server.cc:2164–2170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2162}
2163
2164void Server::UpdateWatchedKeysFromArgs(const std::vector<std::string> &args, const redis::CommandAttributes &attr) {
2165 if ((attr.GenerateFlags(args, *GetConfig()) & redis::kCmdWrite) && watched_key_size_ > 0) {
2166 attr.ForEachKeyRange([this](const std::vector<std::string> &args,
2167 redis::CommandKeyRange range) { updateWatchedKeysFromRange(args, range); },
2168 args, [this](const std::vector<std::string> &) { updateAllWatchedKeys(); });
2169 }
2170}
2171
2172void Server::UpdateWatchedKeysManually(const std::vector<std::string> &keys) {
2173 std::shared_lock lock(watched_key_mutex_);

Callers 1

ExecuteCommandsMethod · 0.80

Calls 2

GenerateFlagsMethod · 0.80
ForEachKeyRangeMethod · 0.80

Tested by

no test coverage detected