[
https://issues.apache.org/jira/browse/SLING-5244?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stefan Egli updated SLING-5244:
-------------------------------
Attachment: loop-i-3.txt
Attached [^loop-i-3.txt] which is an extraction of the full.txt just showing
the loop with {{i=3}}. The findings:
* unlike *all* other votings, this one concludes in just one 'j-loop' - that
is, it requires just once doing {{analyzeVotings}} by both instances
* this is possible when the slingId1 created voting1, slingId2 creates voting2,
then slingId2 votes first, votes yes for voting1 cos that's the lower order
(alphabetic order), then slingId1 comes to analyze and sees that its voting
already won. Actually not really an unrealistic scenario, but seems it happens
rarely and usually 2 rounds of analyzeVotings are necessary (probably cos they
don't *see* the peers vote yet cos they are really voting concurrently)
* when there's only 1 'j-loop', then there's only 1 no-vote - which is exactly
the missing one in the end
* the 'i-loop' checks for at least getting one no-vote less than number of
votees, and that assumption should always hold - however we cannot make any
assertions in the end anymore easily
> discovery.impl.cluster.voting.VotingHandlerTest.testConcurrentVotesTwoNodes
> failed on jenkins
> ---------------------------------------------------------------------------------------------
>
> Key: SLING-5244
> URL: https://issues.apache.org/jira/browse/SLING-5244
> Project: Sling
> Issue Type: Bug
> Components: Extensions
> Affects Versions: Discovery Impl 1.1.8
> Reporter: Stefan Egli
> Assignee: Stefan Egli
> Fix For: Discovery Impl 1.2.2
>
> Attachments:
> VotingHandlerTest.testConcurrentVotesTwoNodes.failure1918.full.txt.gz,
> VotingHandlerTest.testConcurrentVotesTwoNodes.failure1918.txt, loop-i-3.txt
>
>
> https://builds.apache.org/job/sling-trunk-1.8/org.apache.sling$org.apache.sling.discovery.impl/1918/testReport/junit/org.apache.sling.discovery.impl.cluster.voting/VotingHandlerTest/testConcurrentVotesTwoNodes/
> {code}
> Error Message
> expected:<456> but was:<455>
> Stacktrace
> java.lang.AssertionError: expected:<456> but was:<455>
> at org.junit.Assert.fail(Assert.java:88)
> at org.junit.Assert.failNotEquals(Assert.java:743)
> at org.junit.Assert.assertEquals(Assert.java:118)
> at org.junit.Assert.assertEquals(Assert.java:555)
> at org.junit.Assert.assertEquals(Assert.java:542)
> at
> org.apache.sling.discovery.impl.cluster.voting.VotingHandlerTest.doTestConcurrentVotes(VotingHandlerTest.java:466)
> at
> org.apache.sling.discovery.impl.cluster.voting.VotingHandlerTest.testConcurrentVotesTwoNodes(VotingHandlerTest.java:322)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)