From 213c9358b88dd29d8f44a965e8278b2898456dfa Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 20 Mar 2008 10:58:00 +0000 Subject: [PATCH] ITS#5430 syncprov/glue can be used two different ways --- servers/slapd/syncrepl.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index d575e245bc..e8ddee979a 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -1203,9 +1203,21 @@ do_syncrepl( op->o_managedsait = SLAP_CONTROL_NONCRITICAL; be = si->si_be; - /* If we're glued, send writes through the glue parent */ + /* Coordinate contextCSN updates with any syncprov overlays + * in use. This may be complicated by the use of the glue + * overlay. + * + * Typically there is a single syncprov mastering the entire + * glued tree. In that case, our contextCSN updates should + * go to the master DB. + * + * Alternatively, there may be individual syncprov overlays + * on each glued branch. In that case, each syncprov only + * knows about changes within its own branch. And so our + * contextCSN updates should only go to the local DB. + */ if ( !si->si_wbe ) { - if ( SLAP_GLUE_SUBORDINATE( be )) { + if ( SLAP_GLUE_SUBORDINATE( be ) && !overlay_is_inst( be, "syncprov" )) { si->si_wbe = select_backend( &be->be_nsuffix[0], 1 ); } else { si->si_wbe = be; -- 2.39.5