Le 05/10/2015 15:32, Parrish, Kyle a écrit :

So we have created a process for LSC to query SQL only for the entries tagged with “UPDATE” in a new column called “State” that has brought the execution time down to seconds and can be run every hour.


Great! How to update this column after the run of LSC?

To handle the deletes, we have decided to simply run the clean phase once per night instead of hourly.

Now for another question…can the executable plugin be used to query SQL for a column tagged “DELETE” and have that run each hour? I started playin around with the executable scripts but I don’t completely understand how it works yet.


The executable script can indeed be used for this. You need to write a source script, that contains only a LIST and a GET function (see http://lsc-project.org/wiki/documentation/plugins/executable/howto_scripts). As for a standard source service, LSC in clean phase will do a GET on source for each entries found in the destination, and will delete an entry in destination if the GET on the source for the corresponding entry returns no result.

So to have good performances, you can first do a full select on your base, ignoring the "DELETE" tagged entries and put the result in a local cache. Then implement the GET to use this cache: with this, LSC will not do a SQL request for each entry, but will only hit your cache.


Hope it helps,

--
Clément OUDOT
Consultant en logiciels libres, Expert infrastructure et sécurité
Savoir-faire Linux

_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org

lsc-users mailing list
[email protected]
http://lists.lsc-project.org/listinfo/lsc-users

Reply via email to