Skip to content

Commit

Permalink
HSEARCH-3075 Document discard changes on transaction rollback
Browse files Browse the repository at this point in the history
  • Loading branch information
fax4ever authored and yrodiere committed Aug 9, 2019
1 parent 6ae163d commit 45ec4ef
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -37,7 +37,8 @@ This is because queries are executed on the database side,
One workaround is to <<mapper-orm-indexing-explicit,explicitly reindex>> after you run such queries.
Indexing happens after transactions are committed::
Indexes are not updated immediately, but only after transactions are successfully committed.
That way, if a transaction is rolled back, the indexes will be left in a state consistent with the database.
That way, if a transaction is rolled back, the indexes will be left in a state consistent with the database,
discarding all the index changes that were planned during the transaction.
+
This means in particular that Hibernate Search will retrieve the state of entities after the transaction is committed.
As a result, clearing the session during the transaction may cause trouble:
Expand Down

0 comments on commit 45ec4ef

Please sign in to comment.