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
When purging, don't de-delta state groups we're about to delete #2214
Conversation
richvdh
assigned
erikjohnston
May 10, 2017
richvdh
added some commits
May 10, 2017
| - for i in xrange(0, len(state_groups_to_delete), 100) | ||
| - ] | ||
| - for chunk in chunks: | ||
| + for i in xrange(0, len(state_rows), 100): |
erikjohnston
May 11, 2017
Owner
It seems odd to dedupe state_groups_to_delete and then use the non-deduped list here
richvdh
May 11, 2017
Member
the set is for easy lookup at line 2101 rather than deduping. We can't easily divide a set into chunks, hence the use of the list here. There shouldn't be any dups because the query has a GROUP BY.
| - new_state_edges.extend(row["state_group"] for row in rows) | ||
| + new_state_edges.extend( | ||
| + row["state_group"] for row in rows | ||
| + if row["state_group"] not in state_groups_to_delete |
erikjohnston
May 11, 2017
Owner
Can you comment this please? It took me a few moments to realise what was going on
erikjohnston
assigned
richvdh
and unassigned
erikjohnston
May 11, 2017
|
@erikjohnston ptal |
richvdh
assigned
erikjohnston
and unassigned
richvdh
May 11, 2017
richvdh
merged commit 29ded77
into
develop
May 11, 2017
8 checks passed
Sytest Dendron (Commit)
Build #2116 origin/rav/hurry_up_purge succeeded in 9 min 15 sec
Details
Sytest Dendron (Merged PR)
Build finished.
Details
Sytest Postgres (Commit)
Build #2951 origin/rav/hurry_up_purge succeeded in 6 min 52 sec
Details
Sytest Postgres (Merged PR)
Build finished.
Details
Sytest SQLite (Commit)
Build #3021 origin/rav/hurry_up_purge succeeded in 6 min 37 sec
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
erikjohnston
added
the
maintenance
label
May 17, 2017
psaavedra
added a commit
to psaavedra/synapse
that referenced
this pull request
May 19, 2017
richvdh
deleted the
rav/hurry_up_purge
branch
Oct 9, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
richvdh commentedMay 10, 2017
... because that's (a) pointless (b) slow and (c) eats all my disk space just when I'm trying to free disk space