[GitHub] [pulsar] Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc
Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc URL: https://github.com/apache/pulsar/pull/5757#discussion_r352093121 ## File path: site2/docs/schema-understand.md ## @@ -539,8 +539,18 @@ This diagram illustrates how does schema work on the Producer side. 3. The broker looks up the schema in the schema storage to check if it is already a registered schema. 4. If yes, the broker skips the schema validation since it is a known schema, and returns the schema version to the producer. + +5. If no, the broker verifies whether a schema can be automatically created in this namespace: + + * If `isAllowAutoUpdateSchema` sets to **true**, then a schema can be created, and the broker validates the schema based on the schema compatibility check strategy defined for the topic. + + * If `isAllowAutoUpdateSchema` sets to **false**, then a schema can not be created, and the consumer is rejected to connect to the broker. -5. If no, the broker validates the schema based on the schema compatibility check strategy defined for the topic. +**Tip**: + +`isAllowAutoUpdateSchema` can be set via **Pulsar admin API** or **REST API.** + +For how to set `isAllowAutoUpdateSchema` via Pulsar admin API, see [Manage AutoUpdate Strategy](schema-manage.md/#manage-autoupdate-strategy). Review comment: Seems a little weird between #5 and #6? Do we need to add some contents like "If a schema is updated automatically:” after #5? 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [pulsar] Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc
Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc URL: https://github.com/apache/pulsar/pull/5757#discussion_r352072982 ## File path: site2/docs/schema-evolution-compatibility.md ## @@ -46,7 +46,7 @@ For more information, see [Schema compatibility check strategy](#schema-compatib ## Schema compatibility check strategy -Pulsar has 8 schema compatibility check strategies, which are summarized in the following table. +Pulsar has 9 schema compatibility check strategies, which are summarized in the following table. Review comment: ```suggestion Pulsar has 8 schema compatibility check strategies, which are summarized in the following table. ``` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [pulsar] Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc
Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc URL: https://github.com/apache/pulsar/pull/5757#discussion_r352091960 ## File path: site2/docs/schema-manage.md ## @@ -50,32 +58,47 @@ For a consumer, the `AutoUpdate` happens in the following cases: * If a **consumer connects to a topic without a schema** (which means the consumer receiving raw bytes), the consumer can connect to the topic successfully without doing any compatibility check. -* If a **consumer connects to a topic with a schema**: - - * If the **topic is idle** (no producers, no entries, no other consumers and no registered schemas), the broker registers a schema for the topic automatically. +* If a **consumer connects to a topic with a schema**. - * If the **topic is not idle**, the broker verifies if the schema provided by the consumer is compatible with the registered schema of the topic. +* If a topic does not have all of them (a schema/data/a local consumer and a local producer): -* If the **schema passes the compatibility check**, the consumer can connect to the topic and receive messages. +* If `isAllowAutoUpdateSchema` sets to **true**, then the consumer registers a schema and it is connected to a broker. + +* If `isAllowAutoUpdateSchema` sets to **false**, then the consumer is rejected to connect to a broker. + +* If a topic has one of them (a schema/data/a local consumer and a local producer), then the schema compatibility check is performed. -* If the **schema does not pass the compatibility check**, the consumer is rejected and disconnected. - - +* If the schema passes the compatibility check, then the consumer is connected to the broker. + +* If the schema does not pass the compatibility check, then the consumer is rejected to connect to the broker. + + + ### Manage AutoUpdate strategy You can use the `pulsar-admin` command to manage the `AutoUpdate` strategy as below: +* [Enable AutoUpdate](#enable-autoupdate) + * [Disable AutoUpdate](#disable-autoupdate) Review comment: As we discussed just now, please correct the commands for `enable` and `disable` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [pulsar] Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc
Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc URL: https://github.com/apache/pulsar/pull/5757#discussion_r351974176 ## File path: site2/docs/schema-understand.md ## @@ -560,16 +563,10 @@ This diagram illustrates how does Schema work on the consumer side. 2. The consumer connects to the broker with the `SchemaInfo` extracted from the passed-in schema instance. -3. The broker looks up the schema in the schema storage to check if it is already a registered schema. - -4. If yes, the broker skips the schema validation since it is a known schema, and returns the schema version to the consumer. - -5. If no, the broker validates the schema based on the schema compatibility check strategy defined for the topic. - -6. If the schema is compatible, the broker stores it and returns the schema version to the consumer. +3. If the schema is compatible, the consumer will be connected. Review comment: ```suggestion 3. If the schema is compatible, the consumer is connected to the broker. ``` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [pulsar] Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc
Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc URL: https://github.com/apache/pulsar/pull/5757#discussion_r351974206 ## File path: site2/docs/schema-understand.md ## @@ -560,16 +563,10 @@ This diagram illustrates how does Schema work on the consumer side. 2. The consumer connects to the broker with the `SchemaInfo` extracted from the passed-in schema instance. -3. The broker looks up the schema in the schema storage to check if it is already a registered schema. - -4. If yes, the broker skips the schema validation since it is a known schema, and returns the schema version to the consumer. - -5. If no, the broker validates the schema based on the schema compatibility check strategy defined for the topic. - -6. If the schema is compatible, the broker stores it and returns the schema version to the consumer. +3. If the schema is compatible, the consumer will be connected. -7. If the schema is incompatible, the consumer will be disconnected. +4. If the schema is incompatible, the consumer will be disconnected. Review comment: ```suggestion 4. If the schema is incompatible, the consumer is disconnected to the broker. ``` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [pulsar] Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc
Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc URL: https://github.com/apache/pulsar/pull/5757#discussion_r351966551 ## File path: site2/docs/schema-manage.md ## @@ -50,17 +58,22 @@ For a consumer, the `AutoUpdate` happens in the following cases: * If a **consumer connects to a topic without a schema** (which means the consumer receiving raw bytes), the consumer can connect to the topic successfully without doing any compatibility check. -* If a **consumer connects to a topic with a schema**: - - * If the **topic is idle** (no producers, no entries, no other consumers and no registered schemas), the broker registers a schema for the topic automatically. +* If a **consumer connects to a topic with a schema**. - * If the **topic is not idle**, the broker verifies if the schema provided by the consumer is compatible with the registered schema of the topic. +* If topic don't have schema, no data or no local consumers and no local producers. -* If the **schema passes the compatibility check**, the consumer can connect to the topic and receive messages. +* If `isAllowAutoUpdateSchema` = true, register the schema and connect. + +* If `isAllowAutoUpdateSchema` = false, rejected. + +* If topic have schema, have data or have local consumers and have local producers., schema do compatibility check -* If the **schema does not pass the compatibility check**, the consumer is rejected and disconnected. - - +* If schema pass the compatibility check, the consumer is connected. + +* If schema does not pass the compatibility, the consumer is rejected. Review comment: ```suggestion * If the schema does not pass the compatibility check, then the consumer is rejected to connect to the broker. ``` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [pulsar] Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc
Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc URL: https://github.com/apache/pulsar/pull/5757#discussion_r351966427 ## File path: site2/docs/schema-manage.md ## @@ -50,17 +58,22 @@ For a consumer, the `AutoUpdate` happens in the following cases: * If a **consumer connects to a topic without a schema** (which means the consumer receiving raw bytes), the consumer can connect to the topic successfully without doing any compatibility check. -* If a **consumer connects to a topic with a schema**: - - * If the **topic is idle** (no producers, no entries, no other consumers and no registered schemas), the broker registers a schema for the topic automatically. +* If a **consumer connects to a topic with a schema**. - * If the **topic is not idle**, the broker verifies if the schema provided by the consumer is compatible with the registered schema of the topic. +* If topic don't have schema, no data or no local consumers and no local producers. -* If the **schema passes the compatibility check**, the consumer can connect to the topic and receive messages. +* If `isAllowAutoUpdateSchema` = true, register the schema and connect. + +* If `isAllowAutoUpdateSchema` = false, rejected. + +* If topic have schema, have data or have local consumers and have local producers., schema do compatibility check -* If the **schema does not pass the compatibility check**, the consumer is rejected and disconnected. - - +* If schema pass the compatibility check, the consumer is connected. Review comment: ```suggestion * If the schema passes the compatibility check, then the consumer is connected to the broker. ``` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [pulsar] Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc
Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc URL: https://github.com/apache/pulsar/pull/5757#discussion_r351964929 ## File path: site2/docs/schema-manage.md ## @@ -36,11 +36,19 @@ For a producer, the `AutoUpdate` happens in the following cases: * If a **producer carries a schema**: -A broker performs the compatibility check based on the configured compatibility check strategy of the namespace to which the topic belongs. +A broker performs the compatibility check based on the configured compatibility check strategy of the namespace to which the topic belongs. -* If it is a new schema and it passes the compatibility check, the broker registers a new schema automatically for the topic. - -* If the schema does not pass the compatibility check, the broker does not register a schema. +* If the schema is registered, producer is connected. + +* If the schema isn't registered + +* If`isAllowAutoUpdateSchema` = false, producer is rejected. + +* If `isAllowAutoUpdateSchema` = true Review comment: ```suggestion * If `isAllowAutoUpdateSchema` sets to **true**: ``` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [pulsar] Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc
Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc URL: https://github.com/apache/pulsar/pull/5757#discussion_r351965890 ## File path: site2/docs/schema-manage.md ## @@ -50,17 +58,22 @@ For a consumer, the `AutoUpdate` happens in the following cases: * If a **consumer connects to a topic without a schema** (which means the consumer receiving raw bytes), the consumer can connect to the topic successfully without doing any compatibility check. -* If a **consumer connects to a topic with a schema**: - - * If the **topic is idle** (no producers, no entries, no other consumers and no registered schemas), the broker registers a schema for the topic automatically. +* If a **consumer connects to a topic with a schema**. - * If the **topic is not idle**, the broker verifies if the schema provided by the consumer is compatible with the registered schema of the topic. +* If topic don't have schema, no data or no local consumers and no local producers. -* If the **schema passes the compatibility check**, the consumer can connect to the topic and receive messages. +* If `isAllowAutoUpdateSchema` = true, register the schema and connect. Review comment: ```suggestion * If `isAllowAutoUpdateSchema` sets to **true**, then the consumer registers a schema and it is connected to a broker. ``` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [pulsar] Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc
Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc URL: https://github.com/apache/pulsar/pull/5757#discussion_r351964897 ## File path: site2/docs/schema-manage.md ## @@ -36,11 +36,19 @@ For a producer, the `AutoUpdate` happens in the following cases: * If a **producer carries a schema**: -A broker performs the compatibility check based on the configured compatibility check strategy of the namespace to which the topic belongs. +A broker performs the compatibility check based on the configured compatibility check strategy of the namespace to which the topic belongs. -* If it is a new schema and it passes the compatibility check, the broker registers a new schema automatically for the topic. - -* If the schema does not pass the compatibility check, the broker does not register a schema. +* If the schema is registered, producer is connected. + +* If the schema isn't registered + +* If`isAllowAutoUpdateSchema` = false, producer is rejected. Review comment: ```suggestion * If `isAllowAutoUpdateSchema` sets to **false**, the producer is rejected to connect to a broker. ``` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [pulsar] Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc
Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc URL: https://github.com/apache/pulsar/pull/5757#discussion_r351973675 ## File path: site2/docs/schema-understand.md ## @@ -539,14 +539,17 @@ This diagram illustrates how does schema work on the Producer side. 3. The broker looks up the schema in the schema storage to check if it is already a registered schema. 4. If yes, the broker skips the schema validation since it is a known schema, and returns the schema version to the producer. + +5. If no, the broker judge whether this namespace can automatically create schema. + isAllowAutoUpdateSchema can be modified by Admin-Api and REST-API -5. If no, the broker validates the schema based on the schema compatibility check strategy defined for the topic. +6. If yes, the broker validates the schema based on the schema compatibility check strategy defined for the topic. Review comment: I've moved the line 546 to the step 5. If it is correct, can we delete the line 546?  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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [pulsar] Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc
Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc URL: https://github.com/apache/pulsar/pull/5757#discussion_r351965710 ## File path: site2/docs/schema-manage.md ## @@ -50,17 +58,22 @@ For a consumer, the `AutoUpdate` happens in the following cases: * If a **consumer connects to a topic without a schema** (which means the consumer receiving raw bytes), the consumer can connect to the topic successfully without doing any compatibility check. -* If a **consumer connects to a topic with a schema**: - - * If the **topic is idle** (no producers, no entries, no other consumers and no registered schemas), the broker registers a schema for the topic automatically. +* If a **consumer connects to a topic with a schema**. - * If the **topic is not idle**, the broker verifies if the schema provided by the consumer is compatible with the registered schema of the topic. +* If topic don't have schema, no data or no local consumers and no local producers. Review comment: ```suggestion * If a topic does not have all of them (a schema/data/a local consumer and a local producer): ``` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [pulsar] Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc
Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc URL: https://github.com/apache/pulsar/pull/5757#discussion_r351966303 ## File path: site2/docs/schema-manage.md ## @@ -50,17 +58,22 @@ For a consumer, the `AutoUpdate` happens in the following cases: * If a **consumer connects to a topic without a schema** (which means the consumer receiving raw bytes), the consumer can connect to the topic successfully without doing any compatibility check. -* If a **consumer connects to a topic with a schema**: - - * If the **topic is idle** (no producers, no entries, no other consumers and no registered schemas), the broker registers a schema for the topic automatically. +* If a **consumer connects to a topic with a schema**. - * If the **topic is not idle**, the broker verifies if the schema provided by the consumer is compatible with the registered schema of the topic. +* If topic don't have schema, no data or no local consumers and no local producers. -* If the **schema passes the compatibility check**, the consumer can connect to the topic and receive messages. +* If `isAllowAutoUpdateSchema` = true, register the schema and connect. + +* If `isAllowAutoUpdateSchema` = false, rejected. + +* If topic have schema, have data or have local consumers and have local producers., schema do compatibility check Review comment: ```suggestion * If a topic has one of them (a schema/data/a local consumer and a local producer), then the schema compatibility check is performed. ``` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [pulsar] Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc
Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc URL: https://github.com/apache/pulsar/pull/5757#discussion_r351971439 ## File path: site2/docs/schema-manage.md ## @@ -75,7 +88,7 @@ You can use the `pulsar-admin` command to manage the `AutoUpdate` strategy as be To disable `AutoUpdate` on a namespace, you can use the `pulsar-admin` command. ```bash -bin/pulsar-admin namespaces set-schema-autoupdate-strategy --disabled tenant/namespace +bin/pulsar-admin namespaces set-is-allow-auto-update-schema --disabled tenant/namespace Review comment: Do we consider adding **enable AutoUpdate** before this part? From line 82: ```suggestion * [Enable AutoUpdate](#enable-autoupdate) * [Disable AutoUpdate](#disable-autoupdate) * [Adjust compatibility](#adjust-compatibility) Enable AutoUpdate To enable `AutoUpdate` on a namespace, you can use the `pulsar-admin` command. ```bash bin/pulsar-admin namespaces set-is-allow-auto-update-schema --enable tenant/namespace ``` ``` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [pulsar] Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc
Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc URL: https://github.com/apache/pulsar/pull/5757#discussion_r351972673 ## File path: site2/docs/schema-understand.md ## @@ -539,14 +539,17 @@ This diagram illustrates how does schema work on the Producer side. 3. The broker looks up the schema in the schema storage to check if it is already a registered schema. 4. If yes, the broker skips the schema validation since it is a known schema, and returns the schema version to the producer. + +5. If no, the broker judge whether this namespace can automatically create schema. + isAllowAutoUpdateSchema can be modified by Admin-Api and REST-API Review comment: ```suggestion 5. If no, the broker verifies whether a schema can be automatically created in this namespace: * If `isAllowAutoUpdateSchema` sets to **true**, then a schema can be created, and the broker validates the schema based on the schema compatibility check strategy defined for the topic. * If `isAllowAutoUpdateSchema` sets to **false**, then a schema can not be created, and the consumer is rejected to connect to the broker. **Tip**: `isAllowAutoUpdateSchema` can be set via **Pulsar admin API** or **REST API.** For how to set `isAllowAutoUpdateSchema` via Pulsar admin API, see [Manage AutoUpdate Strategy](schema-manage.md/#manage-autoupdate-strategy). ``` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [pulsar] Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc
Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc URL: https://github.com/apache/pulsar/pull/5757#discussion_r351964839 ## File path: site2/docs/schema-manage.md ## @@ -36,11 +36,19 @@ For a producer, the `AutoUpdate` happens in the following cases: * If a **producer carries a schema**: -A broker performs the compatibility check based on the configured compatibility check strategy of the namespace to which the topic belongs. +A broker performs the compatibility check based on the configured compatibility check strategy of the namespace to which the topic belongs. -* If it is a new schema and it passes the compatibility check, the broker registers a new schema automatically for the topic. - -* If the schema does not pass the compatibility check, the broker does not register a schema. +* If the schema is registered, producer is connected. + +* If the schema isn't registered Review comment: ```suggestion * If the schema is not registered: ``` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [pulsar] Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc
Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc URL: https://github.com/apache/pulsar/pull/5757#discussion_r351965377 ## File path: site2/docs/schema-manage.md ## @@ -36,11 +36,19 @@ For a producer, the `AutoUpdate` happens in the following cases: * If a **producer carries a schema**: -A broker performs the compatibility check based on the configured compatibility check strategy of the namespace to which the topic belongs. +A broker performs the compatibility check based on the configured compatibility check strategy of the namespace to which the topic belongs. -* If it is a new schema and it passes the compatibility check, the broker registers a new schema automatically for the topic. - -* If the schema does not pass the compatibility check, the broker does not register a schema. +* If the schema is registered, producer is connected. + +* If the schema isn't registered + +* If`isAllowAutoUpdateSchema` = false, producer is rejected. + +* If `isAllowAutoUpdateSchema` = true + +* If schema pass the compatibility check then the broker registers a new schema automatically for the topic and producer is connected. + +* If the schema does not pass the compatibility check, the broker does not register a schema and producer is rejected. Review comment: ```suggestion * If the schema does not pass the compatibility check, then the broker does not register a schema and the producer is rejected to connect to a broker. ``` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [pulsar] Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc
Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc URL: https://github.com/apache/pulsar/pull/5757#discussion_r351964819 ## File path: site2/docs/schema-manage.md ## @@ -36,11 +36,19 @@ For a producer, the `AutoUpdate` happens in the following cases: * If a **producer carries a schema**: -A broker performs the compatibility check based on the configured compatibility check strategy of the namespace to which the topic belongs. +A broker performs the compatibility check based on the configured compatibility check strategy of the namespace to which the topic belongs. -* If it is a new schema and it passes the compatibility check, the broker registers a new schema automatically for the topic. - -* If the schema does not pass the compatibility check, the broker does not register a schema. +* If the schema is registered, producer is connected. Review comment: ```suggestion * If the schema is registered, a producer is connected to a broker. ``` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [pulsar] Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc
Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc URL: https://github.com/apache/pulsar/pull/5757#discussion_r351966076 ## File path: site2/docs/schema-manage.md ## @@ -50,17 +58,22 @@ For a consumer, the `AutoUpdate` happens in the following cases: * If a **consumer connects to a topic without a schema** (which means the consumer receiving raw bytes), the consumer can connect to the topic successfully without doing any compatibility check. -* If a **consumer connects to a topic with a schema**: - - * If the **topic is idle** (no producers, no entries, no other consumers and no registered schemas), the broker registers a schema for the topic automatically. +* If a **consumer connects to a topic with a schema**. - * If the **topic is not idle**, the broker verifies if the schema provided by the consumer is compatible with the registered schema of the topic. +* If topic don't have schema, no data or no local consumers and no local producers. -* If the **schema passes the compatibility check**, the consumer can connect to the topic and receive messages. +* If `isAllowAutoUpdateSchema` = true, register the schema and connect. + +* If `isAllowAutoUpdateSchema` = false, rejected. Review comment: ```suggestion * If `isAllowAutoUpdateSchema` sets to **false**, then the consumer is rejected to connect to a broker. ``` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [pulsar] Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc
Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc URL: https://github.com/apache/pulsar/pull/5757#discussion_r351965303 ## File path: site2/docs/schema-manage.md ## @@ -36,11 +36,19 @@ For a producer, the `AutoUpdate` happens in the following cases: * If a **producer carries a schema**: -A broker performs the compatibility check based on the configured compatibility check strategy of the namespace to which the topic belongs. +A broker performs the compatibility check based on the configured compatibility check strategy of the namespace to which the topic belongs. -* If it is a new schema and it passes the compatibility check, the broker registers a new schema automatically for the topic. - -* If the schema does not pass the compatibility check, the broker does not register a schema. +* If the schema is registered, producer is connected. + +* If the schema isn't registered + +* If`isAllowAutoUpdateSchema` = false, producer is rejected. + +* If `isAllowAutoUpdateSchema` = true + +* If schema pass the compatibility check then the broker registers a new schema automatically for the topic and producer is connected. Review comment: ```suggestion * If schema pass the compatibility check then the broker registers a new schema automatically for the topic and producer is connected. ``` ```suggestion * If the schema passes the compatibility check, then the broker registers a new schema automatically for the topic and the producer is connected. ``` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [pulsar] Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc
Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc URL: https://github.com/apache/pulsar/pull/5757#discussion_r351958437 ## File path: site2/docs/schema-evolution-compatibility.md ## @@ -366,6 +366,40 @@ Any order + + + + +`UNDEFINED` + + + + + +The schema compatibility check strategy in order to Upgrade to 2.5.0 or above for compatibility with pulsar version below 2.5.0. Review comment: ```suggestion * If you upgrade a lower version to Pulsar 2.5.0, then it uses the `UNDEFINED` strategy, at this time, it actually uses the compatibility strategy of the topic. * If you use Pulsar 2.5.0 and a higher version, then it uses the `UNDEFINED` strategy, at this time, it actually uses the `FULL` compatibility strategy. ``` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [pulsar] Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc
Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc URL: https://github.com/apache/pulsar/pull/5757#discussion_r351959172 ## File path: site2/docs/schema-evolution-compatibility.md ## @@ -626,6 +660,44 @@ None In some data formats, for example, Avro, you can define fields with default values. Consequently, adding or removing a field with a default value is a fully compatible change. +### UNDEFINED + + + + + + + +Compatibility check strategy + + + + + +Note + + + + + + + + + +`UNDEFINED` + + + + + +The schema compatibility check strategy in order to Upgrade to 2.5.0 or above for compatibility with pulsar version below 2.5.0. Review comment: ```suggestion * If you upgrade a lower version to Pulsar 2.5.0, then it uses the `UNDEFINED` strategy, at this time, it actually uses the compatibility strategy of the topic. * If you use Pulsar 2.5.0 and a higher version, then it uses the `UNDEFINED` strategy, at this time, it actually uses the `FULL` compatibility strategy. ``` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [pulsar] Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc
Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc URL: https://github.com/apache/pulsar/pull/5757#discussion_r351963820 ## File path: site2/docs/schema-evolution-compatibility.md ## @@ -626,6 +660,44 @@ None In some data formats, for example, Avro, you can define fields with default values. Consequently, adding or removing a field with a default value is a fully compatible change. +### UNDEFINED + + + + + + + +Compatibility check strategy + + + + + +Note + + + + + + + + + +`UNDEFINED` + + + + + +The schema compatibility check strategy in order to Upgrade to 2.5.0 or above for compatibility with pulsar version below 2.5.0. + + + + + + + Review comment: Add schema verification here. I've re-written some sentences as well. ```suggestion ## Schema verification When a producer or a consumer tries to connect to a topic, a broker performs some checks to verify a schema. ### Producer When a producer tries to connect to a topic (suppose ignore the schema auto creation), a broker does the following checks: * Check if the schema carried by the producer exists in the schema registry or not. * If the schema is already registered, then the producer is connected to a broker and produce messages with that schema. * If the schema is not registered, then Pulsar verifies if the schema is allowed to be registered based on the configured compatibility check strategy. ### Consumer When a consumer tries to connect to a topic, a broker checks if a carried schema is compatible with a registered schema based on the configured schema compatibility check strategy. Compatibility check strategy Check logic `ALWAYS_COMPATIBLE` All pass `ALWAYS_INCOMPATIBLE` No pass `BACKWARD` Can read the last schema `BACKWARD_TRANSITIVE` Can read all schemas `FORWARD` Can read the last schema `FORWARD_TRANSITIVE` Can read the last schema `FULL` Can read the last schema `FULL_TRANSITIVE` Can read all schemas ``` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [pulsar] Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc
Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc URL: https://github.com/apache/pulsar/pull/5757#discussion_r351958691 ## File path: site2/docs/schema-evolution-compatibility.md ## @@ -366,6 +366,40 @@ Any order + + + + +`UNDEFINED` + + + + + +The schema compatibility check strategy in order to Upgrade to 2.5.0 or above for compatibility with pulsar version below 2.5.0. + + + + + +NONE + + + + + +NONE + + Review comment: ```suggestion It depends ``` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [pulsar] Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc
Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc URL: https://github.com/apache/pulsar/pull/5757#discussion_r351959083 ## File path: site2/docs/schema-evolution-compatibility.md ## @@ -626,6 +660,44 @@ None In some data formats, for example, Avro, you can define fields with default values. Consequently, adding or removing a field with a default value is a fully compatible change. +### UNDEFINED + + + + + + + +Compatibility check strategy + + + + + +Note Review comment: ```suggestion Description ``` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [pulsar] Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc
Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc URL: https://github.com/apache/pulsar/pull/5757#discussion_r351963750 ## File path: site2/docs/schema-evolution-compatibility.md ## @@ -781,3 +853,168 @@ Consequently, you can upgrade the producers and consumers in **any order**. + +## Schema verification for producers Review comment: I've moved this part before `order of upgrading clients`, please delete lines 857-1017. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [pulsar] Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc
Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc URL: https://github.com/apache/pulsar/pull/5757#discussion_r351958714 ## File path: site2/docs/schema-evolution-compatibility.md ## @@ -366,6 +366,40 @@ Any order + + + + +`UNDEFINED` + + + + + +The schema compatibility check strategy in order to Upgrade to 2.5.0 or above for compatibility with pulsar version below 2.5.0. + + + + + +NONE + + + + + +NONE + + + + + +NONE Review comment: ```suggestion It depends ``` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [pulsar] Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc
Anonymitaet commented on a change in pull request #5757: [doc]Modify schema compatibility check doc URL: https://github.com/apache/pulsar/pull/5757#discussion_r351958676 ## File path: site2/docs/schema-evolution-compatibility.md ## @@ -366,6 +366,40 @@ Any order + + + + +`UNDEFINED` + + + + + +The schema compatibility check strategy in order to Upgrade to 2.5.0 or above for compatibility with pulsar version below 2.5.0. + + + + + +NONE Review comment: ```suggestion It depends ``` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services