bookkeeper
bookkeeper copied to clipboard
Simplify the batching of V2 AddResponses
Motivation
The batching solution for V2 AddResponses doesn't seem natural for a Netty application. Batching can be implemented using the Netty Pipeline handlers instead. This avoids synchronization and avoids any possible ordering issues that could be caused when calls are entering in multiple ways.
Changes
- Write the AddResponses to the Netty Pipeline and use a handler to do the batching. A marker message is used to signal the flushing.
Related to changes #3848 and #3837
@lhotari some tests broke, e.g.
Error: Errors:
Error: org.apache.bookkeeper.client.BookKeeperTest.testReadWriteWithV2WireProtocol
Error: Run 1: BookKeeperTest.testReadWriteWithV2WireProtocol » BKNotEnoughBookies Not enough non-faulty bookies available
Error: Run 2: BookKeeperTest.testReadWriteWithV2WireProtocol » BKNotEnoughBookies Not enough non-faulty bookies available
Error: Run 3: BookKeeperTest.testReadWriteWithV2WireProtocol » BKNotEnoughBookies Not enough non-faulty bookies available
reopen's reason: rerun failure checks