Il 06/03/2015 13:35, Rob van de Meulengraaf ha scritto:
Hi,
Our client is having some problems with the ScriptedSQL connector. In
some cases it tries to do a create in an external database instead of
the expected update. This will throw an exception that the entry is
already existing.
Our flow is:
1. Create account 1
2. Create account 2
3. Update attribute in account 1 with the ID from account 2 (link
account2 to account1)
In can see that in AbstractPropagationTaskExecutor the flow is:
1. find entry to be updated
2. if not found do create
3. if found do update
Apparently there are some timing issues between the find and the
create/update when doing two propagations quick after each other. They
probably run in parallel? I does not happen always, only under some load.
I subclassed PriorityPropagationTaskExecutor and have overridden the
execute method with a synchronized version and this seems to stop the
problem:
@Override
public synchronized TaskExec execute(PropagationTask task,
PropagationReporter reporter) {
return super.execute(task, reporter);
}
However that will probably slow down as all propagations are now
sequential?
Any ideas for a better solution or workaround? Or is my solution correct?
We use Syncope 1.1.8
Thanks,
Rob
Hi Rob, this sounds a little bit weird. Before apply your solution I do
think you have to try to find out the real cause of your problem.
Can you explain better why you have two propagation tasks executed
concurrently on the same resource/account?
Can you provide more details about your configuration?
Best regards,
F.
--
Fabio Martelli
Tirasa - Open Source Excellence
http://www.tirasa.net/
Apache Syncope PMC
http://people.apache.org/~fmartelli/