Bug
Creating topics for the same subject in different processes simultaneously fails
Issue description
Given two import files F1 and F2 that contain information about same new subject S. They are imported through jobs J1 and J2 – thus in different PHP processes. Both create new Tobjects O1 and O2 representing the same subject S. They share a common subject identifier SI. Now there is a race condition. Let us assume J1 finishes first: O1 will be persisted as a topic T1. Once J2 wants to persist T2 (which should be the same as T1), the operation fails with the error message: Subject identifier SI already taken.
Developer comments
A few things come to mind. This can only happen with identified subjects, in the case at hand it was a PayPal transaction. It is neccessary to check before the second tobject is persited whether in the meantime the subject identifier was already created and if so set the id of the tobject accordingly. This could just happen instead of throwing the exception. Interprocess communication could be a more complicated alternative.
|
|
We are sorry
This page cannot be displayed in your browser. Use Firefox, Opera, Safari, or Chrome instead.