From 479fc04298364324656199612592adf1e935f2c1 Mon Sep 17 00:00:00 2001 From: maheshnikam <55378196+nikam14@users.noreply.github.com> Date: Tue, 24 Sep 2024 14:10:16 +0530 Subject: [PATCH 1/3] Improved error message in serverCnx.java --- .../java/org/apache/pulsar/broker/service/ServerCnx.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java index 7d196ad30235b..dc18632d5b67b 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java @@ -3052,7 +3052,8 @@ private CompletableFuture tryAddSchema(Topic topic, SchemaData sc CompletableFuture result = new CompletableFuture<>(); if (hasSchema && (schemaValidationEnforced || topic.getSchemaValidationEnforced())) { result.completeExceptionally(new IncompatibleSchemaException( - "Producers cannot connect or send message without a schema to topics with a schema")); + "Producers cannot connect or send message without a schema to topics with a schema" + +"when SchemaValidaitonEnforced is enabled")); } else { result.complete(SchemaVersion.Empty); } @@ -3727,4 +3728,4 @@ public void incrementThrottleCount() { public void decrementThrottleCount() { throttleTracker.decrementThrottleCount(); } -} \ No newline at end of file +} From d5e9661ef74f2bc38f97bfe6f32e846b15e6a049 Mon Sep 17 00:00:00 2001 From: maheshnikam <55378196+nikam14@users.noreply.github.com> Date: Tue, 24 Sep 2024 14:30:00 +0530 Subject: [PATCH 2/3] Update ServerCnx.java --- .../main/java/org/apache/pulsar/broker/service/ServerCnx.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java index dc18632d5b67b..05740ed96d81d 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java @@ -3053,7 +3053,7 @@ private CompletableFuture tryAddSchema(Topic topic, SchemaData sc if (hasSchema && (schemaValidationEnforced || topic.getSchemaValidationEnforced())) { result.completeExceptionally(new IncompatibleSchemaException( "Producers cannot connect or send message without a schema to topics with a schema" - +"when SchemaValidaitonEnforced is enabled")); + + "when SchemaValidaitonEnforced is enabled")); } else { result.complete(SchemaVersion.Empty); } From a134c675dc9d05d5b3f0e4406f24d2966ccdc379 Mon Sep 17 00:00:00 2001 From: maheshnikam <55378196+nikam14@users.noreply.github.com> Date: Tue, 24 Sep 2024 17:20:38 +0530 Subject: [PATCH 3/3] typo fix --- .../main/java/org/apache/pulsar/broker/service/ServerCnx.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java index 05740ed96d81d..5b67b01115e7c 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java @@ -3053,7 +3053,7 @@ private CompletableFuture tryAddSchema(Topic topic, SchemaData sc if (hasSchema && (schemaValidationEnforced || topic.getSchemaValidationEnforced())) { result.completeExceptionally(new IncompatibleSchemaException( "Producers cannot connect or send message without a schema to topics with a schema" - + "when SchemaValidaitonEnforced is enabled")); + + "when SchemaValidationEnforced is enabled")); } else { result.complete(SchemaVersion.Empty); }