Skip to content

Conversation

@zhouyifan279
Copy link
Owner

Fixes apache#24792

Motivation

After unloading a bundle with many non-persistent topics from Broker, we found some producers in ProducerAccessMode.Shared mode were still publishing messages to the broker. Even thought the topic was not loaded by the broker any more.

Modifications

Verifying this change

  • Make sure that the change passes the CI checks.

This change added tests and can be verified as follows:

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
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository:

@codecov
Copy link

codecov bot commented Sep 27, 2025

Codecov Report

❌ Patch coverage is 91.66667% with 2 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (master@f7a02aa). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...rg/apache/pulsar/broker/service/AbstractTopic.java 91.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##             master       #3   +/-   ##
=========================================
  Coverage          ?   74.19%           
  Complexity        ?    33282           
=========================================
  Files             ?     1907           
  Lines             ?   148703           
  Branches          ?    17250           
=========================================
  Hits              ?   110329           
  Misses            ?    29560           
  Partials          ?     8814           
Flag Coverage Δ
inttests 26.45% <58.33%> (?)
systests 22.73% <33.33%> (?)
unittests 73.72% <91.66%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...rg/apache/pulsar/broker/service/AbstractTopic.java 88.50% <91.66%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug][broker] Producer still publishes messages to Broker after Topic was unloaded.

2 participants