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

Stefan Seelmann commented on DIRSERVER-1810:
--------------------------------------------

The problem is that the modification is not replicated to the consumer.

I enabled debug log for PROVIDER_LOG and CONSUMER_LOG (those feature specific 
loggers are very useful btw :) and made the following observation: When the 
test fails I see that after 10 seconds (and after the modification are done in 
the provider server) the provider creates the following log:

[23:12:30] DEBUG [org.apache.directory.server.PROVIDER_LOG-] - updating the 
details of replica ReplicaEventLog [hostName=localhost.localdomain, 
searchFilter=(objectClass=*), 
lastSentCsn=20130523211220.318000Z#000000#000#000000, 
searchCriteria=Notification criteria : 'dc=example,dc=com', 
'(objectClass=*:[1])', 'sub', 'NEVER_DEREF_ALIASES', 'ALL EVENTS', replicaId=1, 
refreshNPersist=true, maxInactivePeriod=172800, purgeThresholdCount=10000, 
journalFile=/tmp/server-work-provider-replication/syncrepl-data/REPL_EVENT_LOG.1,
 dirty=true, consumerEntryDn=ads-dsReplicaId=1,ou=consumers,ou=system]
[23:12:30] DEBUG [org.apache.directory.server.PROVIDER_LOG-] - updated the 
LastSentCSN of consumer entry ads-dsReplicaId=1,ou=consumers,ou=system

The first log statement is written from 
SyncReplRequestHandler.storeReplicaInfo() which is called from a Runnable 
running within the "consumerInfoUpdateThread" in a endless loop with a sleep of 
10 seconds.

So I added a 
    Thread.sleep( 10000 );
to the end of the setUp() method of the test class. The effect is that the 
above log records is written *before* the modification is done in the provider 
server, and the test passes.

To be honest I have no idea what the storeReplicaInfo() method does. But I 
think it is clear that there is some timeing issue. I also don't know if there 
is a potential problem that changes are not replicated (and lost?) when there 
are modifications between the connect time of the consumer and the call of 
storeReplicaInfo()?

                
> Test case 
> org.apache.directory.server.replication.ClientServerReplicationIT.testModDn() 
> fails permanently
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-1810
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1810
>             Project: Directory ApacheDS
>          Issue Type: Bug
>            Reporter: Pierre-Arnaud Marcelot
>            Priority: Blocker
>             Fix For: 2.0.0-RC1
>
>
> Test case 
> org.apache.directory.server.replication.ClientServerReplicationIT.testModDn() 
> fails permanently on my machine via Maven *and* in Eclipse.
> I ignored it until we find a fix.
> Here's the error:
> java.lang.AssertionError
>       at org.junit.Assert.fail(Assert.java:86)
>       at org.junit.Assert.assertTrue(Assert.java:41)
>       at org.junit.Assert.assertTrue(Assert.java:52)
>       at 
> org.apache.directory.server.replication.ClientServerReplicationIT.testModDn(ClientServerReplicationIT.java:290)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:597)
>       at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
>       at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>       at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
>       at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>       at 
> org.apache.directory.junit.tools.MultiThreadedMultiInvoker$1$1.run(MultiThreadedMultiInvoker.java:160)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
>       at java.lang.Thread.run(Thread.java:680)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to