Lucene.Net.Store.Azure
Lucene.Net.Store.Azure copied to clipboard
Multithreading when downloading cache
Hi,
We use this package in Azure Function. In Azure Function, the host instance is stopped and then restarted every few hours. When the instance is initialized, we would download the blob container content into RAMDirectory. I think that sometimes when the cache is being downloaded and something else also tries to run a request, AzureDirectory will try to download the cache twice. Because of that, we sometimes get random exceptions like:
Cannot parse '"a"': Encountered "<EOF>" at line 1, column 2.
Was expecting one of:
<NOT> ...
"+" ...
"-" ...
<BAREOPER> ...
"(" ...
"*" ...
<QUOTED> ...
<TERM> ...
<PREFIXTERM> ...
<WILDTERM> ...
<REGEXPTERM> ...
"[" ...
"{" ...
<NUMBER> ...
<TERM> ...
"*" ...
What is the best way to use this package in Azure Function and ensure that the usage of the package is thread-safe?