michaeljmarshall commented on a change in pull request #13604:
URL: https://github.com/apache/pulsar/pull/13604#discussion_r778250701
##########
File path:
pulsar-broker/src/test/java/org/apache/pulsar/broker/intercept/CounterBrokerInterceptor.java
##########
@@ -66,42 +66,52 @@
}
@Override
- public void onConnectionCreated(ServerCnx cnx){
- log.info("Connection created {}", cnx);
+ public void onConnectionCreated(ServerCnx cnx) {
+ if (log.isDebugEnabled()) {
+ log.info("Connection created {}", cnx);
Review comment:
Shouldn't we also change the actual log lines to match their log guard?
```suggestion
log.debug("Connection created {}", cnx);
```
##########
File path:
pulsar-broker/src/test/java/org/apache/pulsar/compaction/CompactedTopicTest.java
##########
@@ -734,4 +735,65 @@ public void testHasMessageAvailableWithNullValueMessage()
throws Exception {
Assert.assertNull(reader.readNext(3, TimeUnit.SECONDS));
}
+ @Test(timeOut = 999999999)
+ public void test() throws Exception {
+ while (true) {
+ testReadCompleteMessagesDuringTopicUnloading();
+ }
+ }
+
+ @Test
+ public void testReadCompleteMessagesDuringTopicUnloading() throws
Exception {
+ String topic =
"persistent://my-property/use/my-ns/testReadCompleteMessagesDuringTopicUnloading-"
+
+ UUID.randomUUID();
+ final int numMessages = 1000;
+ @Cleanup
+ Producer<String> producer = pulsarClient.newProducer(Schema.STRING)
+ .topic(topic)
+ .blockIfQueueFull(true)
+ .enableBatching(false)
+ .create();
+ CompletableFuture<MessageId> lastMessage = null;
+ for (int i = 0; i < numMessages; ++i) {
+ lastMessage = producer.newMessage().key(i +
"").value(String.format("msg [%d]", i)).sendAsync();
+ }
+ producer.flush();
+ lastMessage.join();
+ admin.topics().triggerCompaction(topic);
+ Awaitility.await().untilAsserted(() -> {
+ PersistentTopicInternalStats stats =
admin.topics().getInternalStats(topic);
+ System.out.println(Json.pretty(stats));
Review comment:
What is this line's purpose?
--
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]