I have implemented and event system that changes component after publish/unpublish and adds time stamp in component field. The component is shared among different publications and we always do publishing in all child publications. So for every website, we change the same component and update the same field. The problem is that our event system does checkout/save/checkin action over component, and so do all other treads of it. Also, we have 2 out-scaled publishers that do this action. The problem that we observed, is that once component is checked out in event system, resolver gets crazy and in another tread resolves items to less number of templates then needed. This way component stays published with some of the templates in some publications. We tried to implement lock over component change action, but it doesn't fix our issue. Additional problem is that we have 2 out-scaled publishers so lock is not possible in that case. We have also contacted SDL customer support and they told us that it is possible that resolver can do this and that we must ensure that it doesn't vi implementation.
So to make it plastic:
- tread 1: resolves component, unpublishes it and start changing it
- tread 2: resolver tries to resolve same component, see that its locked and somehow resolves it to less items (component should be unpublished with 7 templates but it gets resolved and unpublished to for example 4).
So my question is how? We cannot localize component in child publications because of requirements.
UPDATE AFTER RESPONSES: I just wanted to clarify based on provided answers. I agree that implementation should be changed, but what i don't understand, and what this question is really about, is Why is resolver affected by event system. Ok, i understand that ES is changing components (checkout/save/checkin). But even with these operations, shouldn't resolver get latest major version and resolve it to correct number of component presentations?