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

Add more logging around message retention policies support #6717

Merged
merged 15 commits into from
Jan 17, 2020

Conversation

babolivier
Copy link
Contributor

@babolivier babolivier commented Jan 16, 2020

So we can debug issues like #6683 more easily.

Built on top of #6714 (so I can test it on my HS).

When figuring out which topological token to start a purge job at, we
need to do the following:

1. Figure out a timestamp before which events will be purged
2. Select the first stream ordering after that timestamp
3. Select info about the first event after that stream ordering
4. Build a topological token from that info

In some situations (e.g. quiet rooms with a short max_lifetime), there
might not be an event after the stream ordering at step 3, therefore we
abort the purge with the error `No event found`. To mitigate that, this
patch fetches the first event _before_ the stream ordering, instead of
after.
@babolivier babolivier requested a review from a team January 16, 2020 14:11
@babolivier babolivier requested a review from a team January 17, 2020 11:44
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

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

lgtm, modulo it not being up-to-date with #6714

@babolivier babolivier merged commit a17f643 into develop Jan 17, 2020
babolivier pushed a commit that referenced this pull request Sep 1, 2021
* commit 'a17f64361':
  Add more logging around message retention policies support (#6717)
  Fix up changelog
  bump version to v1.9.0.dev2
@babolivier babolivier deleted the babolivier/retention_log branch October 28, 2021 15:54
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