On 23/07/2015 05:25, Chetan Mehrotra wrote:
> Currently while performing indexing if there is any exception thrown
> by one of the IndexEditor then the whole commit is aborted. However
> other IndexEditors do not get a notification that there is a failure
> and hence cannot perform any cleanup like releasing external
> resources.
>
> This problem does not effect editors which only deal with NodeStore.
> However if a editor is dealing with external resources like
> LuceneIndexEditor which might be using FSDirectory and has taken locks
> on file system then it cause problem as seen in OAK-3053.
>
> Would it be possible to modify current design to allow some callback
> to IndexEditor if they are implementing Closeable?
>
> Thoughts?
>
I like the idea and I think we could extend it with a concept of
success/failure. So to have a callback that is always invoked either on
success or failure. When failing it could provide additional info as
well so that the implementers could act accordingly.

Davide

Reply via email to