poorbarcode commented on code in PR #25461:
URL: https://github.com/apache/pulsar/pull/25461#discussion_r3107898718
##########
pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdNamespaces.java:
##########
@@ -2163,14 +2163,20 @@ private class SetIsAllowAutoUpdateSchema extends
CliCommand {
@Option(names = { "--disable", "-d" }, description = "Disable schema
validation enforced")
private boolean disable = false;
+ @Option(names = { "--disable-for-replicator" },
+ description = "By default, brokers always allow replicator to
register new compatible schemas even"
+ + " when auto updates are disabled, if you want to disable
replicators to register compatible schemas,"
+ + " please set it to true")
+ private boolean disableForReplicator;
+
Review Comment:
> --disable-for-replicator is a primitive boolean defaulting to false, so
every set-is-allow-auto-update-schema call sends
allowAutoUpdateSchemaWithReplicator=true unless the flag is supplied. A user
who ran ... --disable --disable-for-replicator and later runs ... --enable
silently re-enables replicator updates — different from the REST API's
null-preserving semantics.
This enhances the convenience of using `pulsar-admin`.
- The design of our API is such that if the boolean type needs to be set to
true, the parameter to be given is' --enableXxx '.
- If 'null' needs to be supported, the user needs to input '--enabledXxx
true/false'
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]