pulsar icon indicating copy to clipboard operation
pulsar copied to clipboard

[improve][broker] Code simplify in `AbstractBaseDispatcher` in filterEntriesForConsumer loop

Open lifepuzzlefun opened this issue 3 years ago • 1 comments

Fixes #18328

Modifications

  1. batch subscription.acknowledgeMesage in filterEntriesForConsumer loop

  2. remove unnecessary Optional package parameter for filterEntriesForConsumer metadataArray

  3. avoid call O(consumer) times of topic.getMigratedClusterUrl in checkAndApplyReachedEndOfTopicOrTopicMigration

Verifying this change

  • [ ] Make sure that the change passes the CI checks.

This change is a trivial rework / code cleanup without any test coverage.

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • [ ] Dependencies (add or upgrade a dependency)
  • [ ] The public API
  • [ ] The schema
  • [ ] The default values of configurations
  • [ ] The threading model
  • [ ] The binary protocol
  • [ ] The REST endpoints
  • [ ] The admin CLI options
  • [ ] Anything that affects deployment

Documentation

  • [ ] doc
  • [ ] doc-required
  • [x] doc-not-needed
  • [ ] doc-complete

lifepuzzlefun avatar Nov 03 '22 17:11 lifepuzzlefun

@codelipenghui @eolivelli @rdhabalia sorry for all the change in commit, can you guys take a look?

lifepuzzlefun avatar Nov 04 '22 08:11 lifepuzzlefun