congbobo184 opened a new pull request #3110: URL: https://github.com/apache/bookkeeper/pull/3110
Descriptions of the changes in this PR: In bookeeper client the ledgerEntryImpl wrongly recycle cause data parsing errors. `org.apache.bookkeeper.client.PendingReadOp` have more `LedgerEntryRequest` for example in PendingReadOp(1) has two LedgerEntryRequest (entryId = 1, entryId = 2) another PendingReadOp(2) has two LedgerEntryRequest (entryId = 3, entryId = 4) 1. When `LedgerEntryRequest (entryId = 1)` read fail will close all `LedgerEntryRequest (entryId = 1, entryId = 2)` in `PendingReadOp(1)`. 2. `LedgerEntryImpl` in `LedgerEntryRequest (entryId = 2)` will be recycle. 3. `LedgerEntryRequest(entryId = 3`) will reuse this `LedgerEntryImpl` in another `PendingReadOp(2)` because the `LedgerEntryImpl` in `LedgerEntryRequest (entryId = 2)` has been recycle. 4. Another `LedgerEntryRequest(entryId = 3)` readComplete will set the ByteBuf to this `LedgerEntryImpl` 5. `LedgerEntryRequest(entryId = 2)` readComplete also use this `LedgerEntryImpl` and set the ByteBuf to this `LedgerEntryImpl`. 6. Now the `LedgerEntryImpl` the entryId is 3 but the ByteBuf is entryId = 2. ### Motivation fix this problem ### Changes when `LedgerEntryRequest(entryId = 2)` reponse come can't change the `LedgerEntryImpl` ByteBuf when LedgerEntryRequest change the complete to true, the response will not change the ByteBuf. because `LedgerEntryRequest(entryId = 2)` readComplete will check complete the same Ledger read will in the same thread. -- 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]
