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

Merged
merged 3 commits into from Jan 31, 2017

Conversation

Projects
None yet
2 participants
Owner

erikjohnston commented Jan 31, 2017

No description provided.

synapse/storage/devices.py
@@ -557,6 +557,9 @@ def _prune_txn(txn):
txn.execute(select_sql)
rows = txn.fetchall()
+ if not rows:
+ return
@NegativeMjark

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

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

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 added some commits Jan 31, 2017

@erikjohnston erikjohnston merged commit ac001da into develop Jan 31, 2017

6 of 8 checks passed

Sytest Dendron (Commit) Build #1447 origin/erikj/device_list_fixes in progress...
Details
Sytest SQLite (Commit) Build #2332 origin/erikj/device_list_fixes in progress...
Details
Sytest Dendron (Merged PR) Build finished.
Details
Sytest Postgres (Commit) Build #2263 origin/erikj/device_list_fixes succeeded in 7 min 8 sec
Details
Sytest Postgres (Merged PR) Build finished.
Details
Sytest SQLite (Merged PR) Build finished.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment