[Asterisk-code-review] RFC: endpoint/stasis: Eliminate duplicate events on endpoint... (asterisk[13])

Matt Jordan asteriskteam at digium.com
Thu Dec 24 22:08:33 CST 2015


Matt Jordan has posted comments on this change.

Change subject: RFC: endpoint/stasis: Eliminate duplicate events on endpoint status change
......................................................................


Patch Set 6:

(2 comments)

If you'd like, I'll see if I can't get all the tests passing, squash my commits into this review, and update this review accordingly.

https://gerrit.asterisk.org/#/c/570/6/main/endpoints.c
File main/endpoints.c:

Line 77: 
       : 
This is the one change I need to investigate further. Right now with this patch, the technology endpoint subscription tests in the TestSuite fail due to getting duplicate endpoint state change messages, and I suspect it is related to the removal of this forwarding and the creation of the new forwarding relationship.

I *think* what we will end up wanting is something like this:

Endpoints (tech/resource) forward to the Tech Endpoint and the All Topic

Tech Endpoints forward to No One

Subscriptions to:
 * An endpoint get that endpoint's updates
 * A tech endpoint get all endpoint's of that technology type's updates
 * All topic gets all 'normal' endpoint updates (but not the aggregation tech endpoint)

This is close to what is being done later in this patch - I'll comment on that section.


Line 325: 		if (stasis_cp_single_forward(endpoint->topics, tech_endpoint->topics)) {
        : 			return NULL;
        : 		}
I'm fairly sure that forwarding both topics to the tech endpoint causes the duplicate messages. I suspect that this is due to the all topic forwarding to the all caching topic already, so forwarding from our individual 'topic' to our individual 'caching topic' is redundant.

I'd actually recommend removing this method, and instead create the caching pattern topic for the technology endpoint through a new allocation routine that does not forward the messages to the all/all caching topics.


-- 
To view, visit https://gerrit.asterisk.org/570
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie47784adfb973ab0063e59fc18f390d7dd26d17b
Gerrit-PatchSet: 6
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Ashley Sanders <asanders at digium.com>
Gerrit-Reviewer: David M. Lee <dlee at digium.com>
Gerrit-Reviewer: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list