summaryrefslogtreecommitdiff
path: root/issues/make-xapian-index-rebuild-conditional-on-database-checksums.gmi
blob: ae73f12b8ab14b2e967ae313ae4438aea507f8a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Make xapian index rebuild conditional on database checksums

* assigned: arun

Currently, we unconditionally rebuild the xapian index once every day regardless of whether the database has actually changed over the last day. Not only is this computationally wasteful, but it also means that we cannot respond to database updates quickly enough.

We need to be rebuilding the xapian index only when the database changes. Here's how:

* [x] Lock the xapian index being built so that two build jobs do not run simultaneously.
* [x] Register database table checksums in the xapian index.
* [x] Trigger an index rebuild only when the checksums have changed.

We now rebuild the xapian index up to once an hour. A cron job runs every hour and checks if the database checksums have changed. If they have indeed changed, the cron job triggers the xapian index rebuild CI job.

* closed