Skip to content

[fix][broker] Fix replicator producers can not share with other exclusive producers#24925

Open
oneby-wang wants to merge 4 commits into
apache:masterfrom
oneby-wang:replication_exclusive_producer_fix
Open

[fix][broker] Fix replicator producers can not share with other exclusive producers#24925
oneby-wang wants to merge 4 commits into
apache:masterfrom
oneby-wang:replication_exclusive_producer_fix

Conversation

@oneby-wang

Copy link
Copy Markdown
Contributor

Fixes #24914

Motivation

Fix geo replication doesn't support normal exclusive producers.

Modifications

Modify AbstractTopic#incrementTopicEpochIfNeeded() method to support normal exclusive producers can share with replicator producers.

Verifying this change

  • Make sure that the change passes the CI checks.

This change is already covered by existing tests, such as (please describe tests).

Old test cases are covered by ExclusiveProducerTest test class.

New test method is OneWayReplicatorTest#testReplicatorProducerWithExclusiveAccessMode().

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: oneby-wang#9

@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Oct 31, 2025
Comment thread pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java Outdated
@lhotari lhotari requested a review from merlimat October 31, 2025 09:48

@lhotari lhotari left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that before this PR is merged, it needs a wider discussion how to address the problem. Essentially allowing another producer to produce to the topic will break the guarantees of exclusive producers described in PIP-68, https://github.com/apache/pulsar/blob/master/pip/pip-68.md .

Please start a dev mailing list discussion so that this gets sufficient attention.

@oneby-wang oneby-wang changed the title [fix][broker] Fix replicator producer can not share with other exclusive producers [fix][broker] Fix replicator producers can not share with other exclusive producers Oct 31, 2025
@oneby-wang

oneby-wang commented Oct 31, 2025

Copy link
Copy Markdown
Contributor Author

Yes, I also noticed that, seems two contradictory aspects. I had posted a discussion mail to dev@pulsar.apache.org, please review: https://lists.apache.org/thread/ccr8p5wvhogljx7qwpf0hk4ort8j48nv.

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

Labels

doc-not-needed Your PR changes do not impact docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Two-way geo replication doesn't support exclusive access producers

2 participants