merlimat opened a new pull request, #4780:
URL: https://github.com/apache/bookkeeper/pull/4780

   ## Summary
   
   Migrates the BookkeeperProtocol.proto wire protocol to use LightProto for 
serialization. Combined with the prior migration of DataFormats / 
DbLedgerStorageDataFormats (#4779), this drops the protobuf-java runtime 
dependency from `bookkeeper-proto` entirely.
   
   LightProto produces wire-compatible output with protoc for the same 
`.proto`, so on-the-wire bookie/client compatibility is preserved.
   
   ### Lifecycle notes
   
   - LightProto messages parsed from a `ByteBuf` hold lazy references into that 
buffer for field access. The decoders now call `materialize()` on parsed 
`Request` / `Response` / `AuthMessage` instances so they survive after the 
source buffer is released.
   - Server response paths that put entry payloads into `ReadLacResponse` or 
`ReadResponse` now copy the bytes via `ByteBufUtil.getBytes(...)`, matching the 
previous `ByteString.copyFrom` semantics.
   
   ### Drive-by fix
   
   `processWriteLacRequestV3` / `processReadLacRequestV3` in 
`BookieRequestProcessor` were ordering work on 
`r.getAddRequest().getLedgerId()` instead of the matching WriteLac/ReadLac 
request. With protobuf this returned a default `0` for the unset field; with 
LightProto it throws `IllegalStateException`. Now uses the correct accessor.
   
   ## Test plan
   
   - [x] `BookieProtoEncodingTest`, `TestBookieRequestProcessor`, 
`TestPerChannelBookieClient`, `WriteEntryProcessorV3Test`, 
`LongPollReadEntryProcessorV3Test`, `GetBookieInfoProcessorV3Test`, 
`ForceLedgerProcessorV3Test`
   - [x] `TestBackwardCompatCMS42` (V2 wire protocol with `AuthMessage`)
   - [x] `BookKeeperTest`, `BookieClientTest`, `BookieInitializationTest`, 
`DbLedgerStorageTest`, `CookieTest`, `TestLedgerMetadataSerDe`, 
`TestLedgerUnderreplicationManager`, `TestGetBookieInfoTimeout`
   - All 169 tests pass


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to