In some cases where successive transactions are performed very fast, some document copies can get the wrong fulltext information.
Example :
1) the user creates a new document (first transaction)
2) the user copies the document (second transaction)
3) the binary listener performs the indexation (third transaction) (consequence of the first, but asynchronous)
As the full-text row is copied before the information was available, the copy is referencing the wrong full-text information until the document binaries will be re-indexed.
One way of solving is to mark the document with the indexing job id in the session that was altering the document. This way, once the indexing completes, all documents that references this indexing job id will be updated with the computed full-text information.
Impacts are:
- org.nuxeo.ecm.core.storage.sql.SessionImpl.updateFulltext()
- org.nuxeo.ecm.core.storage.sql.coremodel.BinaryTextListener.handleEvent(EventBundle)