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

Re: Not deleted in Syncrepl



s_hira@nifty.com wrote:
> Hi, All
> 
> I confirmed the problem that was not deleted in syncrepl of V2.4.30.

Looks like you're right, but please post this to the OpenLDAP ITS for tracking
purposes.
> 
> The provider operates it in "syncprov-sessionlog 100".
> After I delete 150 in a provider, and going syncrepl
> Only 100 cases are deleted in the consumer side.
> 
> After examining it, the following parts seem to have a problem.
> 
> servers/slapd/overlays/syncprov.c:2638
>     if ( sl->sl_num>  0 ) {
>         int i;
>         for ( i=0; i<sl->sl_numcsns; i++ ) {
>             /* SID not present == new enough */
>             if ( minsid<  sl->sl_sids[i] ) {
>                 do_play = 1;
>                 break;
>             }
>             /* SID present and new enough */
>             if ( minsid == sl->sl_sids[i]
>                 &&  ber_bvcmp(&mincsn,&sl->sl_mincsn[i] )>= 0 ) {
>                 do_play = 1;
>                 break;
>             }
>         }
>         /* SID not present == new enough */
>         if ( i == sl->sl_numcsns )
>             do_play = 1;
>     }
>     if ( do_play ) {
>         do_present = 0;
>         /* mutex is unlocked in playlog */
>         syncprov_playlog( op, rs, sl, srs, ctxcsn, numcsns, sids );
>     } else {
>         ldap_pvt_thread_mutex_unlock(&sl->sl_mutex );
>     }
> 
> Then, it corrected as follows.
> ===
> -      if ( minsid == sl->sl_sids[i]
> -&&  ber_bvcmp(&mincsn,&sl->sl_mincsn[i] )>= 0 ) {
> +      if ( minsid == sl->sl_sids[i] ) {
> +          if ( ber_bvcmp(&mincsn,&sl->sl_mincsn[i] )>= 0 ) {
>                 do_play = 1;
> +          }
>             break;
>         }
> 
> Is this correction wrong?
> 
> 
> HIRABAYASHI Satoshi
> s_hira@nifty.com
> 
> 


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