Skip to content

Commit

Permalink
Revert some use less change
Browse files Browse the repository at this point in the history
  • Loading branch information
Demogorgon314 committed Jun 21, 2023
1 parent b18239e commit 85570d1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,21 +143,15 @@ public void close() {
}

public CompletableFuture<Optional<PersistentTopic>> getTopic(String topicName) {
try {
if (closed.get()) {
if (log.isDebugEnabled()) {
log.debug("[{}] Return null for getTopic({}) since channel is closing",
requestHandler.ctx.channel(), topicName);
}
return CompletableFuture.completedFuture(Optional.empty());
if (closed.get()) {
if (log.isDebugEnabled()) {
log.debug("[{}] Return null for getTopic({}) since channel is closing",
requestHandler.ctx.channel(), topicName);
}
CompletableFuture<Optional<PersistentTopic>> topicCompletableFuture =
kafkaTopicLookupService.getTopic(topicName, requestHandler.ctx.channel());
return topicCompletableFuture;
} catch (Throwable error) {
log.error("Unhandled error here for {}", topicName, error);
return CompletableFuture.completedFuture(Optional.empty());
}
CompletableFuture<Optional<PersistentTopic>> topicCompletableFuture =
kafkaTopicLookupService.getTopic(topicName, requestHandler.ctx.channel());
return topicCompletableFuture;
}

public void invalidateCacheForFencedManagerLedgerOnTopic(String fullTopicName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public void testKafkaProduceMessageOrder(int batchSize) throws Exception {
@Cleanup
KafkaProducer<Integer, String> producer = new KafkaProducer<>(props);

int totalMsgs = 10;
int totalMsgs = batchSize * 2 + batchSize / 2;
String messageStrPrefix = "Message_Kop_KafkaProducePulsarConsumeOrder_";

List<CompletableFuture<RecordMetadata>> handles = new ArrayList<>();
Expand Down
2 changes: 1 addition & 1 deletion tests/src/test/resources/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@
<Logger name="io.streamnative" level="debug"/>
<Logger name="org.apache.pulsar" level="info"/>
<Logger name="org.apache.bookkeeper" level="info"/>
<Logger name="org.apache.kafka" level="info"/>
<Logger name="org.apache.kafka" level="debug"/>
</Loggers>
</Configuration>

0 comments on commit 85570d1

Please sign in to comment.