Skip to content

[improve][broker]Part-3 of PIP-433: always allow replicator to register a new compatible schema#25461

Merged
poorbarcode merged 10 commits intoapache:masterfrom
poorbarcode:pip-433/p3
Apr 30, 2026
Merged

[improve][broker]Part-3 of PIP-433: always allow replicator to register a new compatible schema#25461
poorbarcode merged 10 commits intoapache:masterfrom
poorbarcode:pip-433/p3

Conversation

@poorbarcode
Copy link
Copy Markdown
Contributor

Motivation

This is part-3 of PIP-433, see the goal 1 in PIP-433

Modifications

always allow the replicator to register a new compatible schema, users can turn off this function

Documentation

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

@poorbarcode poorbarcode added this to the 5.0.0 milestone Apr 3, 2026
@poorbarcode poorbarcode self-assigned this Apr 3, 2026
@poorbarcode poorbarcode modified the milestones: 5.0.0, 4.3.0 Apr 3, 2026
@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Apr 3, 2026
Comment thread pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdNamespaces.java Outdated
Comment thread pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdNamespaces.java Outdated
@Denovo1998
Copy link
Copy Markdown
Contributor

@poorbarcode @codelipenghui
Seems like there are some issues?

When geo-replicator creates a remote producer in the broker, it indeed carries the replicator's producer name and uses Schema.AUTO_PRODUCE_BYTES().

But the key point of AUTO_PRODUCE_BYTES is: when establishing a producer connection, it doesn't send the "specific schema of this message" all at once. The actual specific schema registration happens later during the message sending process, when encountering a new schema, it then triggers GET_OR_CREATE_SCHEMA. This call chain looks like this locally:

  1. When replicator acts as a producer to establish a connection, the ProducerImpl.connectionOpened(...) method sends the PRODUCER command, which includes the producerName. But later, when it actually needs to register a specific schema, it follows the path tryRegisterSchema(...) -> getOrCreateSchemaAsync(...).

  2. The method finally calls Commands' newGetOrCreateSchema(requestId, topic, schemaInfo).

  3. This command builder only wrote requestId/topic/schema, without writing producerName.

  4. So the CommandGetOrCreateSchema sent from the sender to the broker always has the field producerName absent.

@poorbarcode poorbarcode merged commit 71462d3 into apache:master Apr 30, 2026
80 of 82 checks passed
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 ready-to-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants