The App Upgraded event runs immediately after Share Point has finished everything that it needs to do when the add-in is updated to a new version, but before the user is notified that updating is complete.
Like the App Installed event, it is an after event, but is essentially synchronous, and it is a best practice to catch errors and notify Share Point to roll back the update.
Another option is to change synchronization method of the event receiver: According to the SPEvent Receiver Definition Properties for WSS3 there is no property which allows to change synchronization method of the event receiver.
To change the event receiver behaviour you could change it's type to make it synchronous (e.g. If synchronization method of the event receiver is changed to “Synchronous” then the event will fire before committing the file to the database thus not conflicting with One Place Mail process.
This last task triggers the App Uninstalling event.
Share Point cannot delete these things, or move them to the recycle bin, because it doesn't know about them, at least not as components of the add-in.First, a user must remove the add-in from the recycle bin, which moves it to the second stage recycle bin.Second, a user must remove the add-in from the second stage recycle bin.For more information, see Include rollback logic and "already done" logic in your add-in event handlers. NOTE] When you install an add-in with Tenant scope, it is installed to the add-in catalog site collection, and the App Installed event runs then and only then.The add-in is visible in multiple websites in the tenancy, but the event does not run separately for each of these. After four timeouts, Share Point rolls back the entire add-in installation.
The URL of the RER service is registered for the events it handles.