ufal / lindat_piwik_reports

Cashing important counts from PIWIK periodically and creating customized reports for LINDAT/CLARIN
2 stars 0 forks source link

How long does it takes for searcher to notice index update? #3

Closed kosarko closed 2 years ago

kosarko commented 5 years ago

When we update the index with a cron job. Is the https://github.com/ufal/lindat_piwik_reports/blob/master/scripts/search_application.py#L9 searcher updated right away, or do the values returned depend on the workers lifecycle (it would then be possible that each worker returns a different count)?

We've observed some sort of value skipping on production. The above might be a pointer to the cause.

kosarko commented 5 years ago

Maybe we should do some isCurrent (https://lucene.apache.org/core/6_5_0/core/org/apache/lucene/index/DirectoryReader.html#isCurrent--) check. Or use the Makefile to restart the workers