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

Thali sequence update probably doesn't happen on no change which hurts perf badly #735

Open
yaronyg opened this Issue Jun 14, 2016 · 0 comments

Comments

Projects
None yet
2 participants
@yaronyg
Member

yaronyg commented Jun 14, 2016

Imagine that phones A and B have both sync'd to the cloud and both have identical state. Neither phone however has synced directly with each other over local radios in some time.

The two phones then get in a room together. Both phone A and B will be advertising for each other because they will have checked the relevant _local/thali_X entries and see that they both have new data and haven't sync'd with the other phone in a while.

So now let's say that phone A connects to phone B and starts a pull replication. The pull replication should not (I think) trigger any change events because all of the docs and revs on B are already on A. So eventually the synch will go quiet and time out. But the problem is that right now we trigger an update to _local/thali_X based on changes and there are no changes in this case! So we won't ever tell B what A has sync'd up to. Which means that B is going to keep advertising for A even though there is actually nothing new to say!

The ideal fix is to figure out how to hook into the PouchDB replication process so that we can see that there are no changes and know to trigger a sequence update based on that.

@yaronyg yaronyg added this to the V1 milestone Aug 3, 2016

@yaronyg yaronyg added 1 - Backlog and removed 0 - Icebox labels Aug 4, 2016

@yaronyg yaronyg added Node and removed 1 - Backlog labels Oct 6, 2016

@yaronyg yaronyg self-assigned this Oct 7, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment