net rpc vampire performance

Don Watson dwwatson at us.ibm.com
Mon Aug 15 13:20:55 GMT 2005


Attached is a patch to net_rpc_samsync.c containing some updates to the "net 
rpc vampire ldif" functionality.  With this patch, fetch_database_to_ldif now 
reads and stores all the deltas, then processes the deltas according to 
whether they are database additions or database modifications.  This 
eliminates the need for the two temporary ldif files which are later 
concatenated into the output ldif file.

The output file now contains three sections, one for the initial populate 
entries (on which ldapadd should be run), one for the add entries (on which 
ldapadd should be run), and one for the modify entries (on which ldapmodify 
should be run).  This makes the output file much easier to deal with.

The current patch uses memcpy to copy the deltas to a location for saving.  
This could perhaps be better done by simply saving the pointers to the deltas 
since the delta memory is not de-allocated until all the work is finished.  
However, the memcpy does not cause a significant performance degradation.  
Also I would like to find a better way to determine group type for aliases, 
which is now accomplished by saving all the sids in an array and calling 
sid_check_is_builtin on the sids.

The patch is based on Version 3.0.21pre0-SCN-build-9225.
-- 
Don Watson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: net_rpc_vampire_ldif.patch
Type: text/x-diff
Size: 44853 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20050815/82aa82f8/net_rpc_vampire_ldif.bin


More information about the samba-technical mailing list