I am currently using the Doctrine postFlush and onFlush lifecycle events to 
index entities that are saved to an external search server. The onFlush 
handler is used to grab the insertions, updates and deletes from the 
UnitOfWork and the the postFlush handler is used to broadcast 
representations of the changed entities to the external system.

Recently we introduced some code which sometimes causes the surrounding 
transaction to be rolled back. However the events are still triggered and 
we end up with information on the external search server which should not 
be there because it was never actually committed to the database.

I would really appreciate it if someone had some advice on how to handle 
this situation. Is there a way to detect a rollback in postFlush? Or 
perhaps there is a better architecture I should consider for synchronising 
the CRUD operations with the external system.

Thank you
--
James

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to