[
https://issues.apache.org/jira/browse/BOOKKEEPER-336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13528124#comment-13528124
]
Sijie Guo commented on BOOKKEEPER-336:
--------------------------------------
two comments about the patch.
1. Using Timer per reading op is not a good idea, because each timer would
create a thread associated with it. Image that there are lots of ledgers being
used (e.g. Hedwig case), there might be lot of threads created, which is bad. I
would suggest using (maybe reuse existing one) ScheduledExecutorService to
schedule speculative reads instead of creating a new timer each time.
2. could you define -1 to meaningful constants? it might make code more
readable.
otherwise, the remaining part of the patch looks good to me.
> bookie readEntries is taking more time if the ensemble has failed bookie(s)
> ---------------------------------------------------------------------------
>
> Key: BOOKKEEPER-336
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-336
> Project: Bookkeeper
> Issue Type: Bug
> Affects Versions: 4.1.0
> Reporter: Brahma Reddy Battula
> Assignee: Ivan Kelly
> Fix For: 4.2.0
>
> Attachments:
> 0001-BOOKKEEPER-336-bookie-readEntries-is-taking-more-tim.patch,
> 0001-BOOKKEEPER-336-bookie-readEntries-is-taking-more-tim.patch,
> 0002-BOOKKEEPER-336-bookie-readEntries-is-taking-more-tim.patch,
> 0002-BOOKKEEPER-336-bookie-readEntries-is-taking-more-tim.patch,
> 0002-BOOKKEEPER-336-bookie-readEntries-is-taking-more-tim.patch,
> BOOKKEEPER-336.1.patch, BOOKKEEPER-336.draft1.diff, BOOKKEEPER-336.patch
>
>
> Scenario:
> 1) Start three bookies. Create ledger with ensemblesize=3, quorumsize=2
> 2) Add 100 entries to this ledger
> 3) Make first bookie down and read the entries from 0-99
> Output: Each entry is going to fetch from the failed bookie and is waiting
> for the bookie connection timeout, only after failure going to next bookie.
> This is affecting the read entry performance.
> Impact: Namenode switching time will be affected by adding this failed bookie
> readTimeOut also.
--
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