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

Re: Correct way to load LDIF in mirrormode



Brett @Google wrote:
> On Sat, Nov 21, 2009 at 7:10 PM, Howard Chu <hyc@symas.com
> <mailto:hyc@symas.com>> wrote:
> 
>     > If this is true, then would i also be correct is saying that -S <sid>
>     > only sets a parameter to enable the -w option to set the SID correctly
>     > in CSN's etc? and that the value provided by -S has no effect if -w is
>     > not provided ?
> 
>     No.
> 
> 
> hmmm.. csnsid in slapadd.c defaults to 0, unless the -S option is given,
> but let us assume it is given -S 1, so csnsid=1
> 
> if the -w option is specified, then update_ctxcsn is >0
> 
> it looks like slapadd will create the berval csn (in memory) which takes
> the value of csnsid,

Yes.

> but it will only write related data if (update_ctxcsn)

The manpage clearly states that -S sets the SID used in generated entryCSNs.

It also clearly states that the -w option writes the contextCSN based on the
greatest entryCSN in the database.

Period, end of story.

> but for multimaster the csnsid is used (thus must be provided) to find
> it's own CSN, but unless update_ctxcsn is >0, it wont change any state?

Huh?

> so maybe -S <sid> is required (with or without -w) to initialize
> multimaster to find the correct CSN (as other master's CSN's could be
> present? - i dont quite get why though if we are re-loading the
> database), but for mirrormode -S <sid> is not required (if there is no
> -w), but only because any other <sid>'s are likely to be shadow contexts
> in the initial case of a data load ?

Again, huh?

-- 
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/