Skip to content

Add schema compatibility strategy on topic level - #13297

Merged
codelipenghui merged 2 commits into
apache:masterfrom
nodece:schema_strategy_topic_level
Jan 28, 2022
Merged

Add schema compatibility strategy on topic level#13297
codelipenghui merged 2 commits into
apache:masterfrom
nodece:schema_strategy_topic_level

Conversation

@nodece

@nodece nodece commented Dec 14, 2021

Copy link
Copy Markdown
Member

Motivation

Currently, the compatibility strategy for a schema is set at namespace level, which means that all the topics of a namespace will need to adhere to the same compatibility check, this level particle size is relatively large, so add schema compatibility strategy on topic level.

Modifications

  • Add set, get and remove schema compatibility strategy API to admin API and client tool
  • Add schema compatibility strategy action to TopicOperation

Verifying this change

  • Make sure that the change passes the CI checks.

Does this pull request potentially affect one of the following parts:

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): no
  • The public API: no
  • The schema: no
  • The default values of configurations: no
  • The wire protocol: no
  • The rest endpoints: no
  • The admin cli options: no
  • Anything that affects deployment: no

Documentation

Check the box below and label this PR (if you have committer privilege).

Need to update docs?

  • doc-required
  • no-need-doc
  • doc

@github-actions

Copy link
Copy Markdown

@nodece:Thanks for your contribution. For this PR, do we need to update docs?
(The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)

@Anonymitaet

Copy link
Copy Markdown
Member

Hi @nodece please do not delete backticks (for example, doc-required ✅, doc-required ❌) or else Bot does not recognize the label, thanks.

@Anonymitaet Anonymitaet added doc-required Your PR changes impact docs and you will update later. and removed doc-label-missing labels Dec 15, 2021
@nodece
nodece force-pushed the schema_strategy_topic_level branch from 76233bc to 087502c Compare December 15, 2021 09:37
@codelipenghui

Copy link
Copy Markdown
Contributor

@Jason918 Could you please help review this PR? Please make sure the new change follows for enhancement way.

@nodece
nodece force-pushed the schema_strategy_topic_level branch 2 times, most recently from c6c25b8 to d8a84e4 Compare December 16, 2021 03:46
@nodece

nodece commented Dec 16, 2021

Copy link
Copy Markdown
Member Author

/pulsarbot run-failure-checks

@Jason918 Jason918 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please refer to org.apache.pulsar.broker.service.AbstractTopic#topicPolicies, and try to make it consistent with other policy handling.

Comment thread pulsar-client-admin-api/src/main/java/org/apache/pulsar/client/admin/Topics.java Outdated
Comment thread pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java Outdated
Comment thread pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java Outdated
@nodece

nodece commented Dec 20, 2021

Copy link
Copy Markdown
Member Author

/pulsarbot run-failure-checks

2 similar comments
@nodece

nodece commented Dec 20, 2021

Copy link
Copy Markdown
Member Author

/pulsarbot run-failure-checks

@nodece

nodece commented Dec 20, 2021

Copy link
Copy Markdown
Member Author

/pulsarbot run-failure-checks

@nodece

nodece commented Dec 22, 2021

Copy link
Copy Markdown
Member Author

/pulsarbot run-failure-checks

Comment thread pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java Outdated
@nodece
nodece force-pushed the schema_strategy_topic_level branch from 8c524d5 to 1e26beb Compare December 29, 2021 02:06
@nodece
nodece force-pushed the schema_strategy_topic_level branch 3 times, most recently from 24dd4f1 to 1a1d0a5 Compare January 19, 2022 02:39
@nodece

nodece commented Jan 19, 2022

Copy link
Copy Markdown
Member Author

/pulsarbot run-failure-checks

@nodece
nodece requested a review from congbobo184 January 19, 2022 09:42
@nodece

nodece commented Jan 19, 2022

Copy link
Copy Markdown
Member Author

@codelipenghui @congbobo184 @Jason918 @315157973 could you take a look this PR?

Comment thread pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java Outdated
@nodece
nodece force-pushed the schema_strategy_topic_level branch 3 times, most recently from 42cfa6e to 498f9de Compare January 20, 2022 08:17
@Anonymitaet Anonymitaet added doc-complete Your PR changes impact docs and the related docs have been already added. and removed doc-required Your PR changes impact docs and you will update later. labels Jan 24, 2022
@nodece
nodece force-pushed the schema_strategy_topic_level branch 2 times, most recently from f40705f to 332ad9b Compare January 27, 2022 02:09
@nodece

nodece commented Jan 27, 2022

Copy link
Copy Markdown
Member Author

/pulsarbot run-failure-checks

@nodece
nodece force-pushed the schema_strategy_topic_level branch from a19abda to 8268c38 Compare January 27, 2022 08:27
### Motivation

Currently, the compatibility strategy for a schema is set at namespace level, which means that all the topics of a namespace will need to adhere to the same compatibility check, this level particle size is relatively large, so add schema compatibility strategy on topic level.

### Modifications

- Add set, get and remove schema compatibility strategy API to admin API and client tool
- Add schema compatibility strategy action to TopicOperation

### Verifying this change

- [x] Make sure that the change passes the CI checks.

### Does this pull request potentially affect one of the following parts:

*If `yes` was chosen, please highlight the changes*

- Dependencies (does it add or upgrade a dependency): no
- The public API: no
- The schema: no
- The default values of configurations: no
- The wire protocol: no
- The rest endpoints: no
- The admin cli options: no
- Anything that affects deployment: no

### Documentation

- [x] `doc-required`

Signed-off-by: Zixuan Liu <nodeces@gmail.com>
@nodece
nodece force-pushed the schema_strategy_topic_level branch from 8268c38 to 4053e29 Compare January 27, 2022 10:13

@congbobo184 congbobo184 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! nice work

@congbobo184

Copy link
Copy Markdown
Contributor

@Jason918 please review again, thanks.

@nodece
nodece requested a review from Jason918 January 28, 2022 02:22

@Jason918 Jason918 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Left a small comment, LGTM overall.

Signed-off-by: Zixuan Liu <nodeces@gmail.com>
@codelipenghui
codelipenghui merged commit d22ff4f into apache:master Jan 28, 2022
Nicklee007 pushed a commit to Nicklee007/pulsar that referenced this pull request Apr 20, 2022
### Motivation

Currently, the compatibility strategy for a schema is set at namespace level, which means that all the topics of a namespace will need to adhere to the same compatibility check, this level particle size is relatively large, so add schema compatibility strategy on topic level.

### Modifications

- Add set, get and remove schema compatibility strategy API to admin API and client tool
- Add schema compatibility strategy action to TopicOperation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-complete Your PR changes impact docs and the related docs have been already added.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants