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
Automatic schema update can be disabled through admin interface #2691
Conversation
Currently when a producer connects to a topic with a new schema, if that schema is fully compatible with the current schema, the schema for the topic is updated to the new schema. This may not be desirable in some cases. This patch allows users to set the auto update schema compatibility strategy at the namespace level. There are 4 compatibility levels, disabled, backward, forward and full.
rerun cpp tests |
rerun java8 tests |
1 similar comment
rerun java8 tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall looks good to me. one comment requires clarifications.
@@ -61,6 +61,9 @@ | |||
public long offload_threshold = -1; | |||
public Long offload_deletion_lag_ms = null; | |||
|
|||
public SchemaAutoUpdateCompatibilityStrategy schema_auto_update_compatibility_strategy = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if a namespace was created by pulsar before this change, and we upgrade pulsar to apply this change, what will happen to the existing clients?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default to full, which is the same behaviour as now.
rerun integration tests |
rerun integration tests |
@merlimat can you review this PR? |
AutoUpdateDisabled, | ||
|
||
/** | ||
* Messages written in the new schema can be read by the previous schema. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we expand the comments to clarify in terms of what happens when you try to use a producer with a newer/older version of the schema?
Messages written in the new schema can be read by the previous schema.
Does that mean that it will update the topic schema only if the new one can be read by a an old client?
rerun java8 tests |
@merlimat could you take another look? I have another patch with the CLI waiting for this to merge. |
rerun java8 tests |
1 similar comment
rerun java8 tests |
Currently when a producer connects to a topic with a new schema, if
that schema is fully compatible with the current schema, the schema
for the topic is updated to the new schema.
This may not be desirable in some cases.
This patch allows users to set the auto update schema compatibility
strategy at the namespace level. There are 4 compatibility levels,
disabled, backward, forward and full.