neo4j/neo4j — pull request #1175 by tinwelint (2013-09-12 12:40:14+00:00)
Title: Fixes a race condition between index population and incoming updates

where the index could end up having duplicates (or more) for any given
entry.

Solution is to change (and clearly document) the contract of the
IndexPopulator#update method in that all updates must be applied in an
idempotent manner. This will incur an overhead in the index population,
but it's a background process and updates comes in in batches so the
overhead is somewhat minimized. Data coming in via IndexPopulator#add does
not have to be checked for idempotency and that fact was clarified a bit
in the javadocs as well.