summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Jordan <mjordan@digium.com>2017-03-14 09:37:34 -0500
committerMatt Jordan <mjordan@digium.com>2017-03-14 09:37:34 -0500
commit216e28aa9575a13554eb6febf8a6cd8cc12cd9d6 (patch)
tree76c4cb7208b3692c13302ad3e3a109a0be7ccb2e
parent523de8eb8e0f7283b6c9210d5da0df541684e784 (diff)
main/stasis_cache: Demote the ERROR message when removing a nonexistent item
This patch demotes the ERROR message that is displayed when a nonexistent item is removed from the Stasis cache. The genesis of this demotion is due to chan_sip's realtime peers and their interaction with Asterisk's core ast_endpoint code, but ostensibly it could happen from other channel drivers as well. Since Mark Michelson already did an excellent job of explaining on this issue, it is quoted here for posterity: "Internally, when a realtime peer is retrieved, Asterisk creates an ast_endpoint structure. When that peer is destroyed, the ast_endpoint is destroyed as well. Part of the destruction of the ast_endpoint involves clearing the Stasis cache of all information about that endpoint. The problem here is that the act of creating the ast_endpoint is not enough to actually put any information in the Stasis cache. Instead, something has to happen, such as a state change, in order for the Stasis cache to have any information about that endpoint. When a device registers, chan_sip creates an ast_endpoint structure, processes the REGISTER, and then destroys the ast_endpoint. When the ast_endpoint is destroyed, there is nothing to destroy in the Stasis cache, so an error message is emitted. When you use rtcachefriends, ast_endpoint structures persist for the lifetime of the module and so you do not see this error message." ASTERISK-25237 #close Change-Id: I53cebc6b4a897a1ab9564182b75c177780feff70
-rw-r--r--main/stasis_cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/stasis_cache.c b/main/stasis_cache.c
index 9129c0064..b0973b984 100644
--- a/main/stasis_cache.c
+++ b/main/stasis_cache.c
@@ -842,7 +842,7 @@ static void caching_topic_exec(void *data, struct stasis_subscription *sub,
}
ao2_cleanup(update);
} else {
- ast_log(LOG_ERROR,
+ ast_debug(1,
"Attempting to remove an item from the %s cache that isn't there: %s %s\n",
stasis_topic_name(caching_topic->topic),
stasis_message_type_name(msg_type), msg_id);