Hi there all!
I have an embedded ES running in a Spring backed application.
I have synchronized ES with the TransactionManager. Updates and
deletes are logged into a TransactionSynchronization context. If the
transaction commits successfully, the operations are replayed to ES.
Works great but...
We are trying to use ES to satisfy all of our search needs, not just
for client facing queries. Thus, our service layer operations would
like to rely as much as possible on ES to do searching but some
usecases can't. As soon as you need to search for something that was
created or updated within the current transaction, ES will only see
these changes after the transaction actually commits.
Question is: I know some work was done around this in Compass. Lucene
also has some basic transactional support. How would you approach
implementing 2PC in ES?
Another bit of info, we are using MySQL, Hibernate and Spring.
Thanks for your comments.