Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Fix clearing out old device list outbound pokes #1864
Conversation
erikjohnston
assigned
NegativeMjark
Jan 31, 2017
| @@ -557,6 +557,9 @@ def _prune_txn(txn): | ||
| txn.execute(select_sql) | ||
| rows = txn.fetchall() | ||
| + if not rows: | ||
| + return |
NegativeMjark
Jan 31, 2017
Contributor
Should we chuck a min(ts) into the SELECT so that we can filter out destinations that don't have anything to delete in them? I'm slightly worried at the number of deletes that we are spamming here.
erikjohnston
Jan 31, 2017
Owner
I wouldn't expect min(ts) < ? to filter out many rows though, as most users won't update particularly frequently.
NegativeMjark
Jan 31, 2017
Contributor
If you throw in a count then you could probably discard all the destination, user_id pairs that only have a single row in them.
erikjohnston commentedJan 31, 2017
No description provided.