Handling Azure uploads failure

Jun 13, 2013 at 7:57 PM
If I followed the code correctly, a Lucene document will be indexed first in the local cache and then eventually uploaded to Azure. Just wondered what happens if the upload to Azure fails (and we end up with storage out-of-sync with the cache)? What do you think would be the best way to mitigate that and ensure that no data gets 'lost'?
Jul 8, 2013 at 8:02 PM
If you do a flush, it will force writing to local segments

The close of the local segments will also upload and commit.

If the upload fails, the local close will fail and it will throw an exception.

It is up to you to maintain a list of changes from last flush to flush.