adamreichold / umwelt-info

umwelt.info metadata index
https://umwelt.info
GNU Affero General Public License v3.0
1 stars 0 forks source link

How to handle changes to index schema? #31

Closed adamreichold closed 2 years ago

adamreichold commented 2 years ago

Currently, re-indexing fails when the schema used by the indexer does not correspond to that stored on disk. We should determine how to handle this, e.g. by deleting or renaming the index directory.

adamreichold commented 2 years ago

One thing to keep in mind that an incompatible index schema probably means that there is still a server running against that index, so I think when deploying new binaries we'll always need to:

  1. replace the existing binaries
  2. rename the index folder under DATA_PATH to index.old (the running server already has the files opened)
  3. run the new indexer to produce an index folder with the new schema (we probably want a separate systemd unit for that)
  4. restart the server so that it runs the new binary against the new index
  5. remove the index.old directory