• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

apache / bookkeeper / 84
72%

Build:
DEFAULT BRANCH: master
Ran 16 May 2018 01:58PM UTC
Jobs 1
Files 416
Run time 26s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
84

push

jenkins

Sijie Guo
ISSUE #1403: ArrayIndexOutOfBoundsException is thrown on readLastAddConfirmedAndEntry

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

Author: Sijie Guo <sijie@apache.org>

Reviewers: Enrico Olivelli <eolivelli@gmail.com>, Jia Zhai <None>

This closes #1404 from sijie/longpoll_tests, closes #1403

23755 of 32794 relevant lines covered (72.44%)

0.72 hits per line

Jobs
ID Job ID Ran Files Coverage
1 84.1 16 May 2018 01:58PM UTC 0
72.44
Source Files on build 84
Detailed source file information is not available for this build.
  • Back to Repo
  • Jenkins Build #84
  • 92591733 on github
  • Prev Build on master (#83)
  • Next Build on master (#85)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc