You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "lifepuzzlefun (via GitHub)" <gi...@apache.org> on 2023/05/27 20:27:48 UTC

[GitHub] [pulsar] lifepuzzlefun commented on a diff in pull request #20415: [improve][broker] Supplement schema ledger if schema ledger is lost

lifepuzzlefun commented on code in PR #20415:
URL: https://github.com/apache/pulsar/pull/20415#discussion_r1208118062


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java:
##########
@@ -697,6 +697,31 @@ public CompletableFuture<Void> checkSchemaCompatibleForConsumer(SchemaData schem
                 .checkConsumerCompatibility(id, schema, getSchemaCompatibilityStrategy());
     }
 
+    protected CompletableFuture<Void> tryCompleteTheLostSchema(SchemaVersion schemaVersion, SchemaData schema) {
+        String id = getSchemaId();
+        return brokerService.pulsar()
+                .getSchemaRegistryService()
+                .tryCompleteTheLostSchema(id, schemaVersion, schema);
+    }
+
+    @Override
+    public CompletableFuture<Long> findSchemaVersion(SchemaData schema) {
+        String id = getSchemaId();
+        return brokerService.pulsar()
+                .getSchemaRegistryService()
+                .findSchemaVersion(id, schema);
+    }
+
+    protected CompletableFuture<SchemaVersion> getLatestSchemaVersion() {
+        return brokerService.pulsar()
+                .getSchemaRegistryService()
+                .getLatestSchemaVersion(getSchemaId())
+                .thenApply(schemaVersion -> {
+                    log.warn("~~~~~~~~~~~~~~~~~~~~~~" + schemaVersion);

Review Comment:
   need remove this debug log



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org