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/06/08 03:56:51 UTC

[GitHub] [pulsar] BewareMyPower opened a new pull request, #15967: [refactor][broker] Remove EntryWrapper usages and use MessageMetadata instead

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

   ### Motivation
   
   https://github.com/apache/pulsar/pull/7266 introduced the `EntryWrapper`
   to store the `Entry` object and the associated `MessageMetadata` if it
   exists. However, the `getEntry` field of `EntryWrapper` is never used.
   There is no need to allocate memory for `EntryWrapper`, even if it's
   allocated from the recycler pool.
   
   ### Modifications
   
   - Calculate the remaining messages without creating `EntryWrapper`
     object, just iterate over the parsed message metadata list.
   - Pass an optional `MessageMetadata` array to `filterEntriesForConsumer`
     and add the JavaDocs for these two parameters.
   
   After that, Remove unused `EntryWrapper` and `updateEntryWrapperWithMetadata`.
   This PR uses functional programming style to make code more simple and clear.
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   This change is already covered by existing tests, such as
   `testBatchMessageDispatchingAccordingToPermits`.
   
   ### Documentation
   
   Check the box below or label this PR directly.
   
   Need to update docs?
   
   - [ ] `doc-required`
   (Your PR needs to update docs and you will update later)
   
   - [x] `doc-not-needed`
   (Please explain why)
   
   - [ ] `doc`
   (Your PR contains doc changes)
   
   - [ ] `doc-complete`
   (Docs have been already added)


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


[GitHub] [pulsar] BewareMyPower merged pull request #15967: [refactor][broker] Remove EntryWrapper usages and use MessageMetadata instead

Posted by GitBox <gi...@apache.org>.
BewareMyPower merged PR #15967:
URL: https://github.com/apache/pulsar/pull/15967


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


[GitHub] [pulsar] BewareMyPower commented on pull request #15967: [refactor][broker] Remove EntryWrapper usages and use MessageMetadata instead

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

   After digging for a while, this PR didn't introduce a bug but it changed the original behavior a little and could bring unexpected behavior. I'll open a new PR and explain it in details.


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


[GitHub] [pulsar] BewareMyPower commented on pull request #15967: [refactor][broker] Remove EntryWrapper usages and use MessageMetadata instead

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

   Sorry for the quick merge since this is a part of my development that I want to split it into multiple PRs. @eolivelli 
   
   And unfortunately, just now I found this PR introduced a bug that I will fix it soon.


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


[GitHub] [pulsar] eolivelli commented on pull request #15967: [refactor][broker] Remove EntryWrapper usages and use MessageMetadata instead

Posted by GitBox <gi...@apache.org>.
eolivelli commented on PR #15967:
URL: https://github.com/apache/pulsar/pull/15967#issuecomment-1149621655

   @BewareMyPower @codelipenghui please give time for other reviewers to see such important patches.
   This patch is touching critical parts of the Broker.
   
   I believe that for non trivial patches we must at least give 1 day for people to see what's going on.
   
   cc @merlimat @rdhabalia @codelipenghui @lhotari 


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


[GitHub] [pulsar] codelipenghui commented on pull request #15967: [refactor][broker] Remove EntryWrapper usages and use MessageMetadata instead

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on PR #15967:
URL: https://github.com/apache/pulsar/pull/15967#issuecomment-1149756738

   @eolivelli Yes, agree.


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