directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kiran Ayyagari (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DIRSERVER-2014) Synchronization is stopped if remote server was not restored during refresh interval
Date Sun, 26 Oct 2014 10:40:34 GMT

    [ https://issues.apache.org/jira/browse/DIRSERVER-2014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14184456#comment-14184456
] 

Kiran Ayyagari commented on DIRSERVER-2014:
-------------------------------------------

This bug affects both RefreshOnly and RefreshAndPersist modes, fixed it here http://svn.apache.org/r1634295.

Thanks for reporting and the detailed steps to reproduce.

> Synchronization is stopped if remote server was not restored during refresh interval
> ------------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-2014
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-2014
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: ldap
>    Affects Versions: 2.0.0-M16
>            Reporter: Alexander Kozlov
>            Assignee: Kiran Ayyagari
>             Fix For: 2.0.0-M18
>
>
> *Steps to reproduce:*
> 1. Set up synchronization between two servers S1 and S2
> 2. Stop server S2
> 3. Wait more than refresh interval
> 4. Start server S2
> *Observed result:*
> S1 never read/update data from S2
> *Reason:*
> When connection lost and we tried to reconnect at least one time, _ReplicationConsumerImpl.disconnected_
field become equals to _true_.
> ReplicationConsumerImpl: {code}
>     private ReplicationStatusEnum doRefreshOnly()
>     {
>         while ( !disconnected )
>         {
>             CONSUMER_LOG.debug( "==================== Refresh Only ==========" );
>             try
>             {
>                 doSyncSearch( SynchronizationModeEnum.REFRESH_ONLY, reload );
>                 CONSUMER_LOG.debug( "--------------------- Sleep for {} seconds ------------------",
( config.getRefreshInterval() / 1000 ) );
>                 Thread.sleep( config.getRefreshInterval() );
>                 CONSUMER_LOG.debug( "--------------------- syncing again ------------------"
);
>             }
>             catch ( InterruptedException ie )
>             {
>                 CONSUMER_LOG.warn( "refresher thread interrupted" );
>                 return ReplicationStatusEnum.DISCONNECTED;
>             }
>             catch ( Exception e )
>             {
>                 CONSUMER_LOG.error( "Failed to sync with refresh only mode", e );
>                 return ReplicationStatusEnum.DISCONNECTED;
>             }
>         }
>         return ReplicationStatusEnum.STOPPED;
>     }
> {code}
> After _Thread.sleep( config.getRefreshInterval() );_ we exit _while_ loop, and method
return _ReplicationStatusEnum.STOPPED_ instead of _DISCONNECTED_.
> LdapServer:{code}
>     public void startReplicationConsumers() throws Exception
>     {
> ...............
>                                     do
>                                     {
>                                         status = consumer.startSync();
>                                     }
>                                     while ( status == ReplicationStatusEnum.REFRESH_REQUIRED
);
>                                     if ( status == ReplicationStatusEnum.STOPPED )
>                                     {
>                                         // Exit the loop
>                                         break;
>                                     }
> ...............
> {code}
> In that we exit from thread, and our server never try to get updated data from S2..



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message