Restore support for transactional backends

Description

See in particular org.hibernate.search.mapper.orm.impl.HibernateSearchContextService#enlistInTransaction.

Note that this ticket only makes sense if we manage to implement a transactional backend, which probably only makes sense for clustered backends to be reintroduced as part of . So we probably don't need to worry about this use case until we start working on .

At the very least we should restore a setting similar to hibernate.search.worker.enlist_in_transaction in Hibernate Search 5.

We might want to reconsider the approach to enlist in the transaction depending on the involved indexes. Some indexes being more critical than others, users might want to use a transactional backend for some, and a non-transactional, more scalable backend for others.

In that case, to make the mapper layer benefit from potential performance gains, we should probably use two work plans: one to be executed within the transaction, for entities mapped to transactional backends/indexes, and the other to be prepared within the transaction, but executed after commit, for entities mapped to non-transactional backends/indexes.

As long as the two work plans target strictly separate indexes, I don't see many potential problems... ?

Activity

Yoann RodièreApril 19, 2021 at 7:21 AM

In HSEARCH-3280, we're introducing transactional automatic indexing strategies, which should address most use cases. Let's open a ticket if another need arises and it's not addressed by HSEARCH-3280.

Out of Date

Details

Assignee

Reporter

Components

Priority

Created September 4, 2018 at 2:21 PM
Updated April 19, 2021 at 7:21 AM
Resolved April 19, 2021 at 7:21 AM