GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — [fix][broker] Fix replication stuck on a schema-less message to a remote topic with an enforced schema by merlimat · Pull Request #27314 · apache/pulsar Conversation
Contributor
MotivationSince #27111, the geo-replicator's The broker rejects the message with // schemaValidationEnforced on both clusters; only the remote topic (r2) has a schema admin2.topics().createNonPartitionedTopic(topic); admin2.schemas().createSchema(topic, Schema.STRING.getSchemaInfo()); admin1.topics().createNonPartitionedTopic(topic); client1.newProducer().topic(topic).create().send(bytes); // never reaches r2 On master, r2's Shadow replication uses the same producer, and a shadow topic reuses its source topic's schema, so it can stall the same way. Modifications
if (isAutoProduceBytes && requiresSchemaVersion && !isRemoteOrShadow && (cnx.getBrokerService().pulsar().getConfig().isSchemaValidationEnforced() || topic.getSchemaValidationEnforced())) { #27312 changes the error code of the same check for other producers and keeps Verifying this change
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
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions…ote topic with an enforced schema Since apache#27111 the replicator's AUTO_PRODUCE_BYTES producer registers on the remote topic without a schema. When that topic has a schema and enforces schema validation, the remote broker rejects every message without a schema version. A message with no schema version on the source topic is replicated without one, so the broker rejected it with MetadataError each time: the replicator re-registered and resent it about 10 times a second, with no send timeout, and nothing after it on the topic was replicated. Skip the per-message schema-version check for replicator producers (geo and shadow). They copy messages their source topic already accepted, as before apache#27111. Other AUTO_PRODUCE_BYTES producers are still checked.
codelipenghui
approved these changes
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LGTM. Reviewed commit 0b997d5. The new regression test fails with repeated MetadataError rejections when the exemption is removed and passes with the fix restored. Focused geo-replication, ordinary-producer schema enforcement, and shadow tests passed. No actionable findings identified within the reviewed scope.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page.
11 tasks
poorbarcode
pushed a commit
to poorbarcode/pulsar
that referenced
this pull request
…ote topic with an enforced schema (apache#27314) (cherry picked from commit 00c5732)
poorbarcode
pushed a commit
to poorbarcode/pulsar
that referenced
this pull request
…duceBytesProducer failing since apache#27314 (apache#27331) (cherry picked from commit 86efc14)
poorbarcode
pushed a commit
to poorbarcode/pulsar
that referenced
this pull request
…ote topic with an enforced schema (apache#27314) (cherry picked from commit 00c5732)
poorbarcode
pushed a commit
to poorbarcode/pulsar
that referenced
this pull request
…duceBytesProducer failing since apache#27314 (apache#27331) (cherry picked from commit 86efc14)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabelsProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |