[ 
https://issues.apache.org/jira/browse/DERBY-4565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12843036#action_12843036
 ] 

Knut Anders Hatlen commented on DERBY-4565:
-------------------------------------------

I agree that the 02 patch looks like an improvement. Let's hope no one will 
have to wait that long, since the waiting thread will burn lots of CPU cycles 
doing nothing in that case...

One other possible improvement is to wait with setting startTime until after 
the first iteration has failed to get a sequence number. That way we don't have 
to call System.currentTimeMillis() in the common case where the number is 
available immediately. I'm not sure how expensive the call to 
currentTimeMillis() is, though. It could be expensive if it requires a switch 
to kernel mode on some platforms, but I don't know, so it might not be 
worthwhile.

> Create concurrency test to stress sequence generators.
> ------------------------------------------------------
>
>                 Key: DERBY-4565
>                 URL: https://issues.apache.org/jira/browse/DERBY-4565
>             Project: Derby
>          Issue Type: Task
>          Components: SQL, Test
>    Affects Versions: 10.6.0.0
>            Reporter: Rick Hillegas
>            Assignee: Rick Hillegas
>         Attachments: derby-4565-01-ad-firstRev.diff, 
> derby-4565-02-aa-useWaitTimeout.diff
>
>
> Create a concurrency test to find bottlenecks and bugs in sequence generators.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to