[ https://issues.apache.org/jira/browse/CASSANDRA-7390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14055120#comment-14055120 ]
Tyler Hobbs commented on CASSANDRA-7390: ---------------------------------------- The v3 patch still has a bit of a race condition: {code} if (updateJobs.get() < 2) { updateJobs.incrementAndGet(); executor.submit(new PendingRangeTask()); } {code} The increment and check need to happen atomically instead of in two separate calls. For example, you could do: {code} if (updateJobs.incrementAndGet() <= 2) executor.submit(new PendingRangeTask()); else updateJobs.decrementAndGet(); {code} Either that, or you could always increment and submit a task regardless of the current count and use the rejected execution handler to decrement the count. > MoveTest fails intermittently > ----------------------------- > > Key: CASSANDRA-7390 > URL: https://issues.apache.org/jira/browse/CASSANDRA-7390 > Project: Cassandra > Issue Type: Bug > Reporter: Joshua McKenzie > Assignee: Joshua McKenzie > Priority: Minor > Fix For: 3.0 > > Attachments: 7390_conservative_v1.txt, 7390_conservative_v2.txt, > 7390_lockpendingcalc.txt, 7390_v3_full.txt > > > Reproduce with: > for i in `seq 1 50`; do runTest MoveTest >> moveTestFailures.txt;done > Looks to fail roughly once out of every 5 runs or so > {code:title=failure} > [junit] Testcase: > newTestWriteEndpointsDuringMove(org.apache.cassandra.service.MoveTest): > FAILED > [junit] mismatched number of moved token expected:<0> but was:<1> > [junit] junit.framework.AssertionFailedError: mismatched number of moved > token expected:<0> but was:<1> > [junit] at > org.apache.cassandra.service.MoveTest.newTestWriteEndpointsDuringMove(MoveTest.java:140) > {code} > Edit: had this as Windows-only - turns out it's failing on on *nix as well -- This message was sent by Atlassian JIRA (v6.2#6252)