[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: How the backend knows it's being searched by syncprov?



Pierangelo Masarati wrote:

Howard Chu wrote:

The entryCSN values are pretty much equivalent to modifyTimestamp. But how can you generate these values on the fly?


Currently back-sql doesn't save any modifyTimestamp (and it shouldn't because they're not guaranteed to be updated if data is modified via RDBMS). So, only when accessed by LDAPsync, I plan to set the entryCSN to a value that makes the synchronization occur, i.e. to make it match searches for entryCSN range as expected by the syncprov overlay. This implies that all entries are always seen as changed even if they're not, but this is the bottomline to allow syncrepl; I hope to work out better solutions in case a timestamp can be saved __AND__ kept up to date in the RDBMS, e.g. by stored procedures and triggers. I think for many installations the refreshOnly with all data being refreshed all times shouldn't be so bad, especially if the refresh interval is large enough (in many cases it could simply be overnight!).

I'm about to commit a couple of changes; you'll probably see them tomorrow.

OK, I see what you mean.

By the way, on the topic of syncrepl not working with backglue (ITS#3133) I think the solution here is to turn backglue into an overlay itself. Then it will be possible to arrange the order of the overlays on the stack and get the correct behavior. (I.e., currently backglue sits at the top of the execution stack, no matter what. In order for the syncprovider overlay to function correctly over a glued set of databases, syncprov must run at the top of the stack, with backglue presenting a view of a single database to it.)

I envision changing the slapd.conf syntax with this change as well; the "subordinate" keyword would no longer be a globally recognized config keyword since it properly belongs to the backglue code. More likely, on the backend where "overlay glue" is configured, there will be a "subordinate <dn>" keyword specifying the suffix of some other backend to attach.

--
 -- Howard Chu
 Chief Architect, Symas Corp.       Director, Highland Sun
 http://www.symas.com               http://highlandsun.com/hyc
 Symas: Premier OpenSource Development and Support