Richard van der Hoff 2fb0bf6152
EventIndexer: ensure we add initial checkpoints when the db is first opened (#31448)
* EventIndex: add some documentation

... because comments are not subject to rationing.

* EventIndex: rationalise addInitialCheckpoints logic

* EventIndex: improve logging

* use a single `logger` instance to do the prefixing
* use `JSON.stringify` on the checkpoints so that the rageshakes are useful
* distinguish between logger.warn and logger.debug
* emit some logs if the crawler loop fails

* Move check for empty database to `init`

The problem with checking if the database is empty in `onSync` is that, by the
time we get there, it won't be.

Instead let's remember if the db was empty in `init`, and then once a sync
completes, we can add the checkpoints.

* Some tests for EventIndexer
2025-12-08 14:08:31 +00:00
..
2025-12-02 13:47:14 +00:00
2025-12-02 13:47:14 +00:00