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

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to