| 3176 | } |
| 3177 | |
| 3178 | void IcingaDB::DeleteState(const String& id, RedisConnection::QueryArg redisObjKey, RedisConnection::QueryArg redisChecksumKey) const |
| 3179 | { |
| 3180 | Log(LogNotice, "IcingaDB") |
| 3181 | << "Deleting state '" << static_cast<std::string_view>(redisObjKey) << "' -> " << std::quoted(id.CStr()); |
| 3182 | |
| 3183 | RedisConnection::Queries hdels = {{"HDEL", std::move(redisObjKey), id}}; |
| 3184 | if (!static_cast<std::string_view>(redisChecksumKey).empty()) { |
| 3185 | hdels.push_back({"HDEL", std::move(redisChecksumKey), id}); |
| 3186 | } |
| 3187 | |
| 3188 | m_RconWorker->FireAndForgetQueries(std::move(hdels)); |
| 3189 | // TODO: This is currently purposefully commented out due to how Icinga DB (Go) handles runtime state |
| 3190 | // upsert and delete events. See https://github.com/Icinga/icingadb/pull/894 for more details. |
| 3191 | /*m_Rcon->FireAndForgetQueries({{ |
| 3192 | "XADD", "icinga:runtime:state", "MAXLEN", "~", "1000000", "*", |
| 3193 | "redis_key", redisKey, "id", id, "runtime_type", "delete" |
| 3194 | }}, Prio::RuntimeStateStream, {0, 1});*/ |
| 3195 | } |
| 3196 | |
| 3197 | /** |
| 3198 | * Add the provided data to the provided map of HMSET queries. |
nothing calls this directly
no test coverage detected