Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find a better mechanism for sharing file_index.db between dias and theremin #164

Open
anjakefala opened this issue Oct 23, 2020 · 0 comments
Labels
scheduler Related to the dias daemon

Comments

@anjakefala
Copy link
Contributor

Both Dias and theremin need access to marimba:/var/lib/dias/file_index.db. To add complexity, theremin is currently on agogo.

At the moment, Dias writes to marimba:/var/lib/dias/file_index.db. This is copied to gong:dias/file_index.db once-a-day. Theremin then accesses the database, in read-only, at gong:dias/file_index.db.

The concerns with this method are:

  • theremin only gets the updated dias products once-a-day. This defeats the intention of having dias run multiple times a day. Also, it might try to access files that do not exist anymore.
  • if someone is trying to access the database while it changes underneath them, then theremin might crash, or send back a garbage result. It is possible that its copy could also be corrupted.

We would like a better solution.

The concerns for any solution are:

  • the effect of simultaneous connections to the database, and possibilities of corruption
  • issues with connecting over an NFS

Alternatives:

  • Place the primary file_index.db on gong and both sensitivity and agogo access it
    • "Did you do any research about consistency issues when accessing a sqlite db file over NFS from multiple hosts? NFS isn't great at locking, and has other issues so I'd be quite worried about this. Can you have a look into this, and post in here what you find out?"
  • Backup from marimba:file_index.db to gong:file_index.db more frequently
    • Would need to ensure a consistent copy, while working with sqlite's locking
  • keep the data_index.db for the analyzer's output files, and do not move that to the tracker
    • makes the tracker less useful
  • move dias or theremin to be on the same host, i.e. move theremin to marimba; or (less likely I think) move dias to agogo.
  • move the file index tables into chimedb. This is probably the best solution.
@anjakefala anjakefala self-assigned this Oct 23, 2020
@anjakefala anjakefala removed their assignment Mar 25, 2021
@ketiltrout ketiltrout added the scheduler Related to the dias daemon label Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scheduler Related to the dias daemon
Projects
None yet
Development

No branches or pull requests

2 participants