aloyszhang commented on code in PR #18293:
URL: https://github.com/apache/pulsar/pull/18293#discussion_r1016101706


##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/service/schema/SchemaServiceTest.java:
##########
@@ -154,6 +168,18 @@ public void writeReadBackDeleteSchemaEntry() throws 
Exception {
         assertNull(schemaRegistryService.getSchema(schemaId1).get());
     }
 
+    @Test
+    public void testConcurrentPutSchema() throws Exception {
+        String schemaId = "tenant/ns/topic_test_concurrent_put_schema" + 
UUID.randomUUID();
+        CompletableFuture.allOf(
+                putSchema(schemaId, schemaData1),
+                putSchema(schemaId, schemaData1),
+                putSchema(schemaId, schemaData1),
+                putSchema(schemaId, schemaData1))
+                .get();
+        assertEquals(getAllSchemas(schemaId).size(), 1);

Review Comment:
   > But I have a minor question, the second request will also create some 
ledgers, which will never be used again, will this PR try to delete the unused 
ledgers?
   
   You can see this reply:  
   https://github.com/apache/pulsar/pull/18293#issuecomment-1305354206
   



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