You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2018/05/12 06:25:39 UTC

[GitHub] sijie opened a new pull request #1404: Issue 1403: ArrayIndexOutOfBoundsException is thrown on readLastAddConfirmedAndEntry

sijie opened a new pull request #1404: Issue 1403: ArrayIndexOutOfBoundsException is thrown on readLastAddConfirmedAndEntry
URL: https://github.com/apache/bookkeeper/pull/1404
 
 
   Descriptions of the changes in this PR:
   
   *Motivation*
   
   There are two bugs in `ReadLastAddConfirmedAndEntry`:
   
   1) a regression was introduced by #657. the long poll read op is attempting to long-poll reading lac. since lac is stored across ensemble, so the retry logic assumes it will attempt over all the bookies in the ensemble. however #657 use a `write-quorum-size` write set for tracking those attempts. this leads to ArrayIndexOutOfBoundsException reported at #1403. The integrate tests added in this PR can easily reproduce this issue.
   
   2) there was a bug on retry logic when a ledger whose ensemble size is larger than write quorum size. when this happens, it will claim lac is not advanced prior to attempt the bookie in the ensemble. so the client will never know lac is advanced if using long poll reads on such ledgers. The integrate tests added in this PR can also catch this issue.
   
   disclaim: twitter uses long poll reads but never uses `ensembleSize > writeQuorumSize`. so this is not a problem for dlog users.
   
   *Solution*
   
   - introduce a `getWriteSetForLongPoll` call that uses `ensembleSize` for building the write set. this would address problem 1)
   - fix the assignment of `numEmptyResponsesAllowed`, so the long poll reads can work with `ensembleSize > writeQuorumSize`
   - add integration tests for long polling reads
   
   at the same time, also add an integration test for normal tailing reads with 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services