1
0
Fork 0
mirror of https://github.com/element-hq/synapse.git synced 2025-03-05 15:37:02 +00:00
synapse/changelog.d
Erik Johnston c46d452c7c
Fix bug where purging history could lead to increase in disk space usage (#18131)
When purging history, we try and delete any state groups that become
unreferenced (i.e. there are no longer any events that directly
reference them). When we delete a state group that is referenced by
another state group, we "de-delta" that state group so that it no longer
refers to the state group that is deleted.

There are two bugs with this approach that we fix here:
1. There is a common pattern where we end up storing two state groups
when persisting a state event: the state before and after the new state
event, where the latter is stored as a delta to the former. When
deleting state groups we only deleted the "new" state and left (and
potentially de-deltaed) the old state. This was due to a bug/typo when
trying to find referenced state groups.
2. There are times where we store unreferenced state groups in the DB,
during the purging of history these would not get rechecked and instead
always de-deltaed. Instead, we should check for this case and delete any
unreferenced state groups rather than de-deltaing them.

The effect of the above bugs is that when purging history we'd end up
with lots of unreferenced state groups that had been de-deltaed (i.e.
stored as the full state). This can lead to dramatic increases in
storage space used.
2025-02-03 19:04:19 +00:00
..
.gitignore Correct attrs package name in requirements (#3492) 2018-07-07 10:46:59 +10:00
18000.bugfix Ratelimit presence updates (#18000) 2025-01-24 19:58:01 +00:00
18073.bugfix Never autojoin deactivated & suspended users. (#18073) 2025-01-28 00:37:24 +00:00
18075.bugfix Fix join being denied after being invited over federation (#18075) 2025-01-27 11:21:10 -06:00
18089.bugfix Contrib: Docker: updates PostgreSQL version in docker-compose.yml (#18089) 2025-01-21 18:54:31 +00:00
18107.bugfix Add locking to more safely delete state groups: Part 1 (#18107) 2025-02-03 17:29:15 +00:00
18109.misc OIDC: increase length of generated nonce parameter from 30->32 chars (#18109) 2025-01-27 18:39:51 +00:00
18112.bugfix Raise an error if someone is using an incorrect suffix in a config duration string (#18112) 2025-01-29 18:14:02 -06:00
18119.bugfix Allow (un)block_room storage functions to be called on workers (#18119) 2025-01-30 20:48:12 +00:00
18130.bugfix Add locking to more safely delete state groups: Part 2 (#18130) 2025-02-03 17:58:55 +00:00
18131.bugfix Fix bug where purging history could lead to increase in disk space usage (#18131) 2025-02-03 19:04:19 +00:00