Due to the optimistic concurrency control (see {@link IndexerDefinition#getOccVersion()}, the update will only succeed if it was not modified since it was read. This situation can be avoided either by disabling the occ check (by setting the OCC version to -1), but also by taking a lock on the index before reading it. In fact, usage of the lock is obliged.
The canonical flow to update an indexer is:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|