-
Notifications
You must be signed in to change notification settings - Fork 889
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support LacPiggyback, LongPoll and ExplicitLac in db ledger storage
Descriptions of the changes in this PR: *Motivation* DbLedgerStorage was developed in yahoo and just merged recently to master. This implementation only works for v2 protocol. It doesn't work with v3 protocol. When using v3 protocol clients (e.g. dlog library) to talk to bookies use DbLedgerStorage, the clients hang on waiting responses. because a few methods in DbLedgerStorage throw UnsupportedException *Solution* This change focuses on adding the implementations for those methods, in order to support LacPiggyback, LongPoll and ExplicitLac for v3 protocol. The implementation follows what we had in FileInfoCache but did it in a much simpler way, since all the persistence information has been managed by db ledger storage itself. All the information required by `LacPiggyback`, `LongPoll` and `ExplicitLac` are transient. This change doesn't introduce any new test cases. It reuses existing test cases to test those features using DbLedgerStorage. These tests are: - ExplicitLacTest: for testing explicit lac - TestPiggybackLAC: for testing piggback lac - TestReadLastConfirmedLongPoll: for testing long polling lac - TestReadLastConfirmedAndEntry: for testing entry piggyback Author: Sijie Guo <sijie@apache.org> Reviewers: Ivan Kelly <ivank@apache.org>, Matteo Merli <mmerli@apache.org> This closes #1218 from sijie/support_long_polls
- Loading branch information
Showing
11 changed files
with
494 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.