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 2022/08/16 01:25:26 UTC
[GitHub] [pulsar] mattisonchao commented on pull request #17105: [fix][broker] Duplicate ByteBuffer when Caching Backlogged Consumers
mattisonchao commented on PR #17105:
URL: https://github.com/apache/pulsar/pull/17105#issuecomment-1216040926
Small suggestion:
Could we make `insert` method ensure it? It can avoid the same problem when you insert it in the future.
Probably make `EntryImpl#create(PositionImpl position, ByteBuf data)` use `retainedDuplicate()`.
Or change the insert method to `insert(EntryImpl entry, boolean duplicateDataBuffer)` and the `duplicateDataBuffer` default is `true`. you can set it to `false` when you ensure you never change the original `ByteBuffer`. (Just quick think and still need deep thinking).
The advantage is that we make this method more fault-tolerant.
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org