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

Owntracks not respecting correct sequence when "flushing" cached locations ? #1031

Open
boogymantoo opened this issue Jul 2, 2021 · 4 comments
Assignees
Labels

Comments

@boogymantoo
Copy link

Upfront apologies: the behavior that I describe here-below was observed during a recent test (June 12, 2021), but I do not know which OT version was installed on the device that behaved like this.

After long sessions of debug and analysis, this is what we observed (with pretty high degree of certainty):

  • the device enters a zone with insufficient network reception, so OT starts caching its locations
  • this situation persists for quite a while - about 30 minutes
  • when the device finally recovers network reception, it starts "flushing" the cached messages one by one
  • BUT new location messages, which are taken during the period that the "flushing" happens, are sent out in real-time, in-between the cached messages

My question is simply whether anyone:

  • has experienced this same or a comparable behavior?
  • can confirm this (if so, is it considered a bug? and if yes, in which version?)

Many thanks,
Chris.

@growse
Copy link
Collaborator

growse commented Jul 2, 2021

Huh, interesting. This shouldn't happen.

Any new messages that get created in the code (either by the device surfacing a new location, or an explicit request to publish) get put at the end of a queue, which is being drained by a separate worker. So when you get reconnected, the worker should start to drain from the head of the queue and post messages to the network in the order they were added to the queue - new messages should be added to the tail, so only get sent after all the others are sent.

I'll try and jig up a test where I give the app a large list of locations to send, and then purposefully make the network slow so that the queue drains slowly. In move mode, that should then generate locations as the queue is draining and we should be able to check the behaviour.

@boogymantoo
Copy link
Author

Huh, interesting. This shouldn't happen.

I'll try and jig up a test where I give the app a large list of locations to send, and then purposefully make the network slow so that the queue drains slowly. In move mode, that should then generate locations as the queue is draining and we should be able to check the behaviour.

Many thanks Andrew. During the field-test where we observed this this, there were about 50 owntracks devices active - a mix of Android and iPhone. From the resulting location messages I am pretty sure this behavior happened on an Android device, but I am not 100% sure. I will contact the participant "behind" the device ID in question.

Best regards,
Chris.

@boogymantoo
Copy link
Author

Huh, interesting. This shouldn't happen.

From the resulting location messages I am pretty sure this behavior happened on an Android device, but I am not 100% sure. I will contact the participant "behind" the device ID in question.

The participant has confirmed that he's using an Android phone, with owntracks version 2.3.0 installed.

@growse
Copy link
Collaborator

growse commented Jul 13, 2021

Ok, I'll try and replicate.

@growse growse self-assigned this Jul 19, 2021
@growse growse added the bug label Jul 19, 2021
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