Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insteon: Ignoring Duplicate Outgoing Messages May Result in a Stalled Queue #261

Closed
krkeegan opened this issue Sep 27, 2013 · 3 comments
Closed
Assignees
Labels

Comments

@krkeegan
Copy link
Collaborator

Again another issue highlighted by @pmatis.

When MH queues an outgoing message, it first checks to see if that message already exists in the queue, if it does, it ignores the new request and does nothing else. This can lead to a stall in some of the more elaborate routines such as scan and sync. This is because these routines heavily rely on the message callbacks to perform each of their many steps. When the outgoing message is simply dropped, the callback is never called and the scan/sync routine just dumbly sits there waiting for something to happen that will never occur.

Now, queuing duplicate messages shouldn't ever happen, so if it is occurring it likely means that there is another issue.

But, when it happens it would be nice if the world didn't come to an end. I think the solution is for the queue_message routine to call the message callback when this happens. However, I am a little concerned that this may lead to some very unexpected results such as multiple sync queue processes happening at once.

@ghost ghost assigned krkeegan Sep 27, 2013
@mstovenour
Copy link
Collaborator

Does it make sense to add some logging code for this issue asking the user to update this issue with the information?

@krkeegan
Copy link
Collaborator Author

It may help some if the logging message is more detailed to include the details of the duplicate message. However, often this information can be gleaned from reviewing the prior messages in the log.

In many instances, the real information that we want, is to go back in time and figure out why the first message is still sitting in the queue.

One of the other thoughts I had was to at least call process_queue when a duplicate message is discovered. In a few instances I have seen messages stalled in the queue yet the queue is not being processed.

Of course finding the original source of all of these errors would be best.

@krkeegan
Copy link
Collaborator Author

I am unable to see a way to make the change I proposed without potentially opening up more problems. Since duplicate messages shouldn't occur, the best thing to do is likely to squash the bugs that lead to them, rather than trying to accommodate them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants