What is the difference between those 2 events in Magento?

magento, magento-1.7

Solution

The category (and all other objects) are saved inside a transaction. The event `catalog_category_save_after` is triggered inside the transaction. So any error that might appear in the observers of this event will trigger a rollback.

The event `catalog_category_save_commit_after` is triggered after the transaction is commit-ed. So any error inside the observers for this event will not trigger a rollback for the category save.

Problem

What is the difference between `<catalog_category_save_after>` and `<catalog_category_save_commit_after>` in Magento? I'm going to create a new module and i have to decide in which of those two events to hang my observer.

Original source