You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/05/02 12:38:18 UTC

[GitHub] [pulsar] BewareMyPower opened a new pull request #10467: Fix publish callback's entry data is null during ledger rollover

BewareMyPower opened a new pull request #10467:
URL: https://github.com/apache/pulsar/pull/10467


   ### Motivation
   
   https://github.com/apache/pulsar/pull/9257 added an extra `ByteBuf` parameter to managed ledger's `AddEntryCallback#addComplete` so that broker can get a buffer view of the entry when it's persisted successfully. However, when a ledger is full and the rollover is triggered, the `addComplete` method will be triggered in `OpAddEntry#closeComplete` and the argument is null.
   
   ### Modifications
   
   - Extend the lifetime of `data` when `ledger.asyncClose` is called in `OpAddEntry#safeRun`, and pass the `data` to `cb.addComplete`, after that, release the `data`.
   - Make current test cover the ledger rollover case.
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   This change is already covered by existing tests, such as *ManagedLedgerTest#asyncAddEntryWithoutError*.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] merlimat merged pull request #10467: Fix publish callback's entry data is null during ledger rollover

Posted by GitBox <gi...@apache.org>.
merlimat merged pull request #10467:
URL: https://github.com/apache/pulsar/pull/10467


   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] BewareMyPower commented on pull request #10467: Fix publish callback's entry data is null during ledger rollover

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on pull request #10467:
URL: https://github.com/apache/pulsar/pull/10467#issuecomment-830826948


   /pulsarbot run-failure-checks


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org