[Asterisk-code-review] stasis_state: Create internal stasis_state_proxy object. (...asterisk[17])
Corey Farrell
asteriskteam at digium.com
Fri Sep 20 14:12:45 CDT 2019
Corey Farrell has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/12911 )
Change subject: stasis_state: Create internal stasis_state_proxy object.
......................................................................
Patch Set 1:
(2 comments)
This should make it slightly easier to troubleshoot MWI state leaks. See also patch uploaded to ASTERISK-28546 which improves the REF_DEBUG information where stasis state has eids added but not removed.
https://gerrit.asterisk.org/#/c/12911/1/main/stasis_state.c
File main/stasis_state.c:
https://gerrit.asterisk.org/#/c/12911/1/main/stasis_state.c@602
PS1, Line 602: ao2_ref(state, +1);
This reference and the matching unref in state_find_and_remove_eid ensure that the object will not free unless state->eids is empty.
https://gerrit.asterisk.org/#/c/12911/1/main/stasis_state.c@726
PS1, Line 726: struct stasis_state *state = ao2_weakproxy_get_object(obj, 0);
Getting the object from weakproxy here and in handle_stasis_state_subscribed adds some overhead. It's possible for weakproxy own state->msg and state->num_subscribers but that could potentially shift some of the overhead to the write side and make the code slightly more complex.
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/12911
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 17
Gerrit-Change-Id: I400e0db4b9afa3d5cb4ac7dad60907897e73f9a9
Gerrit-Change-Number: 12911
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Comment-Date: Fri, 20 Sep 2019 19:12:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190920/83e6afd1/attachment.html>
More information about the asterisk-code-review
mailing list