merlimat commented on a change in pull request #14102:
URL: https://github.com/apache/pulsar/pull/14102#discussion_r812522821



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java
##########
@@ -1266,6 +1267,12 @@ private SchemaStorage createAndStartSchemaStorage() 
throws Exception {
         return schemaStorage;
     }
 
+    private void setSchemaRegistryName(SchemaStorage schemaStorage) {
+        if (schemaStorage == null) {
+            
this.config.setSchemaRegistryClassName("org.apache.pulsar.broker.service.schema.DefaultSchemaRegistryService");
+        }
+    }

Review comment:
       What is the purpose of this method? It's not immediately clear why we 
need it.

##########
File path: conf/standalone.conf
##########
@@ -431,15 +435,15 @@ brokerClientTlsCiphers=
 brokerClientTlsProtocols=
 
 # Enable or disable system topic
-systemTopicEnabled=false
+systemTopicEnabled=true

Review comment:
       This change is not related 

##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/SchemaRegistryServiceImpl.java
##########
@@ -221,6 +210,35 @@ public SchemaVersion versionFromBytes(byte[] version) {
         return schemaStorage.versionFromBytes(version);
     }
 
+    @Override
+    public void initialize(ServiceConfiguration configuration, SchemaStorage 
schemaStorage)
+          throws PulsarServerException {
+        try {
+            Map<SchemaType, SchemaCompatibilityCheck> checkers =
+                  
getCheckers(configuration.getSchemaRegistryCompatibilityCheckers());
+            this.schemaStorage = schemaStorage;
+            this.compatibilityChecks = checkers;
+            this.clock = Clock.systemUTC();

Review comment:
       The point of taking a `clock` parameter was to facilitate precise tests. 
We shouldn't be using `Clock.systemUTC()` or it just defeats the testing 
purpose.

##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/SchemasResourceBase.java
##########
@@ -117,7 +117,7 @@ public void deleteSchema(boolean authoritative, 
AsyncResponse response) {
         validateDestinationAndAdminOperation(authoritative);
 
         String schemaId = getSchemaId();
-        pulsar().getSchemaRegistryService().deleteSchema(schemaId, 
defaultIfEmpty(clientAppId(), ""))
+        pulsar().getSchemaRegistryService().putEmptySchema(schemaId, 
defaultIfEmpty(clientAppId(), ""))

Review comment:
       Here it is probably more appropriate to call `deleteSchemaFromStorage()`

##########
File path: conf/standalone.conf
##########
@@ -431,15 +435,15 @@ brokerClientTlsCiphers=
 brokerClientTlsProtocols=
 
 # Enable or disable system topic
-systemTopicEnabled=false
+systemTopicEnabled=true
 
 # The schema compatibility strategy is used for system topics.
 # Available values: ALWAYS_INCOMPATIBLE, ALWAYS_COMPATIBLE, BACKWARD, FORWARD, 
FULL, BACKWARD_TRANSITIVE, FORWARD_TRANSITIVE, FULL_TRANSITIVE
 systemTopicSchemaCompatibilityStrategy=ALWAYS_COMPATIBLE
 
 # Enable or disable topic level policies, topic level policies depends on the 
system topic
 # Please enable the system topic first.
-topicLevelPoliciesEnabled=false
+topicLevelPoliciesEnabled=true

Review comment:
       This change is not related




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to