Avoid race condition between indexing threads When more than one thread try to index a change in the target instance, it could be possible that, because of a race condition, the last thread writes an outdated status to the index. Synchronize the threads indexing the same change while still allowing parallelization between threads indexing different changes. Change-Id: Ic47c9d220f124c096e5e66bb46d13a9a7b0f51e7