You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by si...@apache.org on 2019/05/03 06:13:15 UTC

[pulsar] branch branch-2.3 updated: AlwaysCompatible doesn't use AlwaysSchemaValidator in 2.3.1 (#4181)

This is an automated email from the ASF dual-hosted git repository.

sijie pushed a commit to branch branch-2.3
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/branch-2.3 by this push:
     new bb21790  AlwaysCompatible doesn't use AlwaysSchemaValidator in 2.3.1 (#4181)
bb21790 is described below

commit bb217909957a9543e1eb7e37101f790076f35022
Author: Sijie Guo <si...@apache.org>
AuthorDate: Fri May 3 14:13:10 2019 +0800

    AlwaysCompatible doesn't use AlwaysSchemaValidator in 2.3.1 (#4181)
    
    *Motivation*
    
    AlwaysCompatible flag doesn't work in 2.3.1 because the flag is using NeverSchemaValidator
    
    *Modifications*
    
    Change to use AlwaysSchemaValidator
---
 .../pulsar/broker/service/schema/AvroSchemaCompatibilityCheck.java      | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/AvroSchemaCompatibilityCheck.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/AvroSchemaCompatibilityCheck.java
index 2a3dc75..d40018f 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/AvroSchemaCompatibilityCheck.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/AvroSchemaCompatibilityCheck.java
@@ -65,6 +65,8 @@ public class AvroSchemaCompatibilityCheck implements SchemaCompatibilityCheck {
                 return createLatestOrAllValidator(validatorBuilder.canBeReadStrategy(), onlyLatestValidator);
             case FULL:
                 return createLatestOrAllValidator(validatorBuilder.mutualReadStrategy(), onlyLatestValidator);
+            case ALWAYS_COMPATIBLE:
+                return AlwaysSchemaValidator.INSTANCE;
             default:
                 return NeverSchemaValidator.INSTANCE;
         }