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/01/04 14:06:49 UTC
[GitHub] [pulsar] codelipenghui opened a new pull request #13604: Change level log to debug for broker interceptor testing
codelipenghui opened a new pull request #13604:
URL: https://github.com/apache/pulsar/pull/13604
### Documentation
Check the box below or label this PR directly (if you have committer privilege).
Need to update docs?
- [ ] `doc-required`
(If you need help on updating docs, create a doc issue)
- [x] `no-need-doc`
(Please explain why)
- [ ] `doc`
(If this PR contains doc changes)
--
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
[GitHub] [pulsar] michaeljmarshall commented on a change in pull request #13604: [Test] Change level log to debug for broker interceptor testing
Posted by GitBox <gi...@apache.org>.
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] lhotari commented on pull request #13604: [Test] Change level log to debug for broker interceptor testing
Posted by GitBox <gi...@apache.org>.
lhotari commented on pull request #13604:
URL: https://github.com/apache/pulsar/pull/13604#issuecomment-1004865962
> ### Documentation
> Check the box below or label this PR directly (if you have committer privilege).
>
> Need to update docs?
>
> * [ ] `doc-required`
> (If you need help on updating docs, create a doc issue)
> * [x] `no-need-doc`
> (Please explain why)
> * [ ] `doc`
> (If this PR contains doc changes)
@codelipenghui please fill in the "Motivation and Modifications" sections for the PR description. Those are very helpful for others.
--
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
[GitHub] [pulsar] codelipenghui commented on a change in pull request #13604: [Test] Change level log to debug for broker interceptor testing
Posted by GitBox <gi...@apache.org>.
codelipenghui commented on a change in pull request #13604:
URL: https://github.com/apache/pulsar/pull/13604#discussion_r778541633
##########
File path: pulsar-broker/src/test/java/org/apache/pulsar/compaction/CompactedTopicTest.java
##########
@@ -37,6 +37,7 @@
import java.util.concurrent.atomic.AtomicLong;
import java.util.stream.IntStream;
+import io.swagger.util.Json;
Review comment:
Oh, sorry. Forget to rebase the master branch.
--
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
[GitHub] [pulsar] lhotari commented on a change in pull request #13604: [Test] Change level log to debug for broker interceptor testing
Posted by GitBox <gi...@apache.org>.
lhotari commented on a change in pull request #13604:
URL: https://github.com/apache/pulsar/pull/13604#discussion_r778130282
##########
File path: pulsar-broker/src/test/java/org/apache/pulsar/compaction/CompactedTopicTest.java
##########
@@ -37,6 +37,7 @@
import java.util.concurrent.atomic.AtomicLong;
import java.util.stream.IntStream;
+import io.swagger.util.Json;
Review comment:
Is this the correct import?
--
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
[GitHub] [pulsar] codelipenghui commented on pull request #13604: [Test] Change level log to debug for broker interceptor testing
Posted by GitBox <gi...@apache.org>.
codelipenghui commented on pull request #13604:
URL: https://github.com/apache/pulsar/pull/13604#issuecomment-1005380232
@lhotari @michaeljmarshall Sorry, my mistake. Please help review again.
--
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
[GitHub] [pulsar] codelipenghui merged pull request #13604: [Test] Change level log to debug for broker interceptor testing
Posted by GitBox <gi...@apache.org>.
codelipenghui merged pull request #13604:
URL: https://github.com/apache/pulsar/pull/13604
--
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