You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by te...@apache.org on 2026/04/08 08:34:54 UTC

(pulsar) branch master updated: [fix][broker] Change the schema incompatible log from ERROR to WARN level (#25483)

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

technoboy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 0b73b3a346c [fix][broker] Change the schema incompatible log from ERROR to WARN level (#25483)
0b73b3a346c is described below

commit 0b73b3a346c3f6c66107123f73bc098b53b0113d
Author: Jiwei Guo <te...@apache.org>
AuthorDate: Wed Apr 8 16:34:47 2026 +0800

    [fix][broker] Change the schema incompatible log from ERROR to WARN level (#25483)
---
 .../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 7106c0d7a59..459e6687e12 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
@@ -230,7 +230,11 @@ public class SchemaRegistryServiceImpl implements SchemaRegistryService {
                 }))).whenComplete((v, ex) -> {
                     var latencyMs = this.clock.millis() - start.longValue();
                     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.longValue() != 0) {
                             this.stats.recordPutFailed(schemaId, latencyMs);
                         }
@@ -458,7 +462,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()) {
@@ -495,7 +499,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()) {