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

Sijie Guo commented on BOOKKEEPER-516:
--------------------------------------

yup, this issue is same as BOOKKEEPER-215. I think we need to get rid of using 
semaphore as the throttling mechanism, otherwise we might endup using lots of 
submit in the callback. using a mature library like guava RateLimiter would be 
a better idea for throttling. I am not sure is there any jira created before 
for this idea. if there is no one, I would create one for it.

two comments about the patch.

1. could you clarify how opCounterSemaphore affects this issue? in my mind 
that, default permits for opCounterSemaphore is a high number. I assumed that 
the test case would not eat up all permits, why it happened?

2. is submit safe enough for semaphore version? should we submit by ledger id? 
would it cause other potential deadlocks?

                
> TestSpeculativeRead failed in Jenkins
> -------------------------------------
>
>                 Key: BOOKKEEPER-516
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-516
>             Project: Bookkeeper
>          Issue Type: Bug
>          Components: bookkeeper-client
>            Reporter: Flavio Junqueira
>            Assignee: Ivan Kelly
>            Priority: Blocker
>             Fix For: 4.2.0
>
>         Attachments: 
> 0001-BOOKKEEPER-516-TestSpeculativeRead-failed-in-Jenkins.patch
>
>
> Here is the jenkins link:
> https://builds.apache.org/job/bookkeeper-trunk/org.apache.bookkeeper$bookkeeper-server/864/testReport/
> and concretely the relevant part of the stack traces:
> {noformat}
> junit.framework.AssertionFailedError: null
>       at junit.framework.Assert.fail(Assert.java:47)
>       at junit.framework.Assert.assertTrue(Assert.java:20)
>       at junit.framework.Assert.assertTrue(Assert.java:27)
>       at 
> org.apache.bookkeeper.client.TestSpeculativeRead$LatchCallback.expectSuccess(TestSpeculativeRead.java:100)
>       at 
> org.apache.bookkeeper.client.TestSpeculativeRead.testSpeculativeReadFirstReadCompleteIsOk(TestSpeculativeRead.java:268)
> {noformat}

--
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