Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[improve][schema] Improve Incompatible Schema Exception error message in ServerCnx.java #23344

Merged
merged 3 commits into from
Sep 25, 2024

Conversation

nikam14
Copy link
Contributor

@nikam14 nikam14 commented Sep 24, 2024

Motivation

When schemavalidaitonenforced is enabled on topic and producer without schema is created on topic then IncompatibleSchemaException is thrown.
When producer without schema is created then by default bytes schema is added to producer.
In error message topic-schema and schemavalidationenforced=enabled is not specified.
After specifying schemavalidaitonenforced=enabled producer will be created with same schema.

Modifications

Modified the error message with specifying that schemaValidaitonEnforced is enabled.

Verifying this change

  • Make sure that the change passes the CI checks.

This change is already covered by existing tests.

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:

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Sep 24, 2024
Copy link
Member

@lhotari lhotari left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov-commenter
Copy link

codecov-commenter commented Sep 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.58%. Comparing base (bbc6224) to head (a134c67).
Report is 603 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #23344      +/-   ##
============================================
+ Coverage     73.57%   74.58%   +1.01%     
- Complexity    32624    33939    +1315     
============================================
  Files          1877     1934      +57     
  Lines        139502   144981    +5479     
  Branches      15299    15839     +540     
============================================
+ Hits         102638   108138    +5500     
+ Misses        28908    28563     -345     
- Partials       7956     8280     +324     
Flag Coverage Δ
inttests 27.57% <ø> (+2.98%) ⬆️
systests 24.56% <ø> (+0.23%) ⬆️
unittests 73.95% <ø> (+1.10%) ⬆️

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

Files with missing lines Coverage Δ
...va/org/apache/pulsar/broker/service/ServerCnx.java 72.56% <ø> (+0.42%) ⬆️

... and 599 files with indirect coverage changes

@Technoboy- Technoboy- added this to the 4.0.0 milestone Sep 25, 2024
@Technoboy- Technoboy- merged commit cefa72c into apache:master Sep 25, 2024
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/schema doc-not-needed Your PR changes do not impact docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants