Trimming the Geo event log
As far as I can tell, once an event has been added to the Geo event log, it is there forever? There seems to be no way to prune old entries.
There are some problems with this:
- as the schema changes over time, we'll need increasingly convoluted data migrations on the old events
- It takes up space unnecessarily
- It makes no sense for a secondary that joins after a year to replay the old events
I think it's reasonable for the primary to regularly check the most recent processed event from all its secondaries. If it manages to retrieve the full set (i.e., no secondaries are offline), it can then purge the event log of all events where the ID is lower than the lowest number in the retrieved set.
When there are no Geo secondaries configured at all, it may make sense for our stores to skip creating the events altogether?
Edited by Nick Thomas