[ 
https://forge.continuent.org/jira/browse/SEQUOIA-1110?page=comments#action_15050
 ] 

Emmanuel Cecchet commented on SEQUOIA-1110:
-------------------------------------------

Hi Stephane,

Thanks for the clarification.
Actually, I did try the program on MacOSX where it waits properly and on 
Windows where I always get 'Only waited = 0'
After some investigation, the problem is not in the wait itself but in the 
granularity of System.getCurrentTimeInMs()

It looks like when the wait time is too small on some architectures, end-start 
will always be 0 (like on my Windows machine). This means that the current fix 
would end up in an infinite loop on my machine. The start timestamp has to be 
extracted from the loop to prevent hitting the timer granularity issue.

Basically, it should look like:
start = gettime
remaining=timeout
while()
{
  wait(remaining)
  end = gettime
  if (end - start > timeout)
   break; // timeout
  remaining = timeout - (end - start);
}

> Error message "No backend thread succeeded to commit transaction" sometimes 
> shows in the log files
> --------------------------------------------------------------------------------------------------
>
>          Key: SEQUOIA-1110
>          URL: https://forge.continuent.org/jira/browse/SEQUOIA-1110
>      Project: Sequoia
>         Type: Bug

>   Components: Core
>     Versions: sequoia 2.10.10
>     Reporter: Stephane Giron
>     Assignee: Robert Hodges
>     Priority: Critical
>      Fix For: sequoia 2.10.11

>
>
> In this case, the CommitTask did not succeed (success=0) but the exceptions 
> List is null.
> SQLException while executing distributed commit 
> java.sql.SQLException: No backend thread succeeded to commit transaction 929 
>         at 
> org.continuent.sequoia.controller.loadbalancer.raidb1.RAIDb1.commit(RAIDb1.java:1320)
>  
>         at 
> org.continuent.sequoia.controller.virtualdatabase.protocol.DistributedCommit.executeCommand(DistributedCommit.java:125)
>  
>         at 
> org.continuent.sequoia.controller.virtualdatabase.protocol.DistributedTransactionMarker.handleMessageMultiThreaded(DistributedTr\
>  
> ansactionMarker.java:131) 
>         at 
> org.continuent.sequoia.controller.virtualdatabase.DistributedVirtualDatabase.handleMessageMultiThreaded(DistributedVirtualDataba\
>  
> se.java:364) 
>         at 
> org.continuent.hedera.adapters.MulticastRequestAdapterThread.run(MulticastRequestAdapterThread.java:102

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   https://forge.continuent.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

_______________________________________________
Sequoia mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/sequoia

Reply via email to