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

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

commit 62fbef788f296f61c352365e475d250da881d7e3
Author: Jiwei Guo <[email protected]>
AuthorDate: Wed Apr 8 16:34:47 2026 +0800

    [fix][broker] Change the schema incompatible log from ERROR to WARN level 
(#25483)
    
    (cherry picked from commit 0b73b3a346c3f6c66107123f73bc098b53b0113d)
---
 .../broker/service/schema/SchemaRegistryServiceImpl.java       | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/SchemaRegistryServiceImpl.java
 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/SchemaRegistryServiceImpl.java
index 5c5ed992d24..a4329ab8d78 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/SchemaRegistryServiceImpl.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/SchemaRegistryServiceImpl.java
@@ -234,7 +234,11 @@ public class SchemaRegistryServiceImpl implements 
SchemaRegistryService {
                 }))).whenComplete((v, ex) -> {
                     var latencyMs = this.clock.millis() - start.getValue();
                     if (ex != null) {
-                        log.error("[{}] Put schema failed", schemaId, ex);
+                        if (ex instanceof IncompatibleSchemaException) {
+                            log.warn("[{}] Put schema failed due to 
incompatible schema", schemaId, ex);
+                        } else {
+                            log.error("[{}] Put schema failed", schemaId, ex);
+                        }
                         if (start.getValue() != 0) {
                             this.stats.recordPutFailed(schemaId, latencyMs);
                         }
@@ -463,7 +467,7 @@ public class SchemaRegistryServiceImpl implements 
SchemaRegistryService {
                 CompletableFuture<Void> result = new CompletableFuture<>();
                 result.whenComplete((__, t) -> {
                     if (t != null) {
-                        log.error("[{}] Schema is incompatible", schemaId);
+                        log.warn("[{}] Schema is incompatible", schemaId);
                         this.stats.recordSchemaIncompatible(schemaId);
                     } else {
                         if (log.isDebugEnabled()) {
@@ -500,7 +504,7 @@ public class SchemaRegistryServiceImpl implements 
SchemaRegistryService {
         result.whenComplete((v, t) -> {
             if (t != null) {
                 this.stats.recordSchemaIncompatible(schemaId);
-                log.error("[{}] Schema is incompatible, schema type {}", 
schemaId, schema.getType());
+                log.warn("[{}] Schema is incompatible, schema type {}", 
schemaId, schema.getType());
             } else {
                 this.stats.recordSchemaCompatible(schemaId);
                 if (log.isDebugEnabled()) {

Reply via email to