You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/09/14 18:37:27 UTC
[GitHub] [pulsar] poorbarcode commented on a diff in pull request #17283: [fix][schema]ledger handle leak when update schema
poorbarcode commented on code in PR #17283:
URL: https://github.com/apache/pulsar/pull/17283#discussion_r971171379
##########
pulsar-broker/src/test/java/org/apache/pulsar/schema/compatibility/SchemaCompatibilityCheckTest.java:
##########
@@ -478,7 +483,56 @@ public void testProducerSendWithOldSchemaAndConsumerCanRead(SchemaCompatibilityS
consumerOne.close();
producerOne.close();
+ }
+ @Test
+ public void testSchemaLedgerAutoRelease() throws Exception {
+ String namespaceName = PUBLIC_TENANT + "/default";
+ String topicName = "persistent://" + namespaceName + "/tp";
+ admin.namespaces().createNamespace(namespaceName, Sets.newHashSet(CLUSTER_NAME));
+ admin.namespaces().setSchemaCompatibilityStrategy(namespaceName, SchemaCompatibilityStrategy.ALWAYS_COMPATIBLE);
+ ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+ // Update schema 100 times.
+ ArrayList<Class> classes = createManyClass(classLoader, 100);
Review Comment:
Already use `SchemaDefinitionBuilder` instead dynamic generate class
--
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