Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Fix clearing out old device list outbound pokes #1864

Merged
merged 3 commits into from
Jan 31, 2017

Conversation

erikjohnston
Copy link
Member

No description provided.

@@ -557,6 +557,9 @@ def _prune_txn(txn):
txn.execute(select_sql)
rows = txn.fetchall()

if not rows:
return
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't expect min(ts) < ? to filter out many rows though, as most users won't update particularly frequently.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

@NegativeMjark NegativeMjark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@erikjohnston erikjohnston merged commit ac001da into develop Jan 31, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants