Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[improve][broker] Set log level to warn when topic policy reader occurs AlreadyClosedException #17841

Merged
merged 1 commit into from
Sep 26, 2022

Conversation

Technoboy-
Copy link
Contributor

@Technoboy- Technoboy- commented Sep 26, 2022

Motivation

The AlreadyClosedException is a normal exception; the ERROR level log may trigger the monitor and confuse the user.
So suggest changing to WARN:

Sep 17 12:08:49 168-11-26-111 pulsar[23776]: 2022-09-17T12:08:49,510+0800 [broker-client-shared-internal-executor-6-1] ERROR org.apache.pulsar.broker.service.SystemTopicBasedTopicPoliciesService - Read more topic policies exception, close the read now!
Sep 17 12:08:49 168-11-26-111 pulsar[23776]: java.util.concurrent.CompletionException: org.apache.pulsar.client.api.PulsarClientException$AlreadyClosedException: The consumer which subscribes the topic MultiTopicsConsumer-6d140 with subscription name multiTopicsReader-9de778b249 was already closed when cleaning and closing the consumers
Sep 17 12:08:49 168-11-26-111 pulsar[23776]: at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:331) ~[?:?]
Sep 17 12:08:49 168-11-26-111 pulsar[23776]: at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:346) ~[?:?]
Sep 17 12:08:49 168-11-26-111 pulsar[23776]: at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:632) ~[?:?]
Sep 17 12:08:49 168-11-26-111 pulsar[23776]: at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) ~[?:?]
Sep 17 12:08:49 168-11-26-111 pulsar[23776]: at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2088) ~[?:?]
Sep 17 12:08:49 168-11-26-111 pulsar[23776]: at org.apache.pulsar.client.impl.ConsumerBase.failPendingReceives(ConsumerBase.java:274) 
Sep 17 12:08:49 168-11-26-111 pulsar[23776]: at org.apache.pulsar.client.impl.ConsumerBase.lambda$failPendingReceive$1(ConsumerBase.java:257) 
Sep 17 12:08:49 168-11-26-111 pulsar[23776]: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
Sep 17 12:08:49 168-11-26-111 pulsar[23776]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
Sep 17 12:08:49 168-11-26-111 pulsar[23776]: at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
Sep 17 12:08:49 168-11-26-111 pulsar[23776]: at java.lang.Thread.run(Thread.java:829) ~[?:?]
Sep 17 12:08:49 168-11-26-111 pulsar[23776]: Caused by: org.apache.pulsar.client.api.PulsarClientException$AlreadyClosedException: The consumer which subscribes the topic MultiTopicsConsumer-6d140 with subscription name multiTopicsReader-9de778b249 was already closed when cleaning and closing the consumers
Sep 17 12:08:49 168-11-26-111 pulsar[23776]: at org.apache.pulsar.client.impl.ConsumerBase.failPendingReceives(ConsumerBase.java:276) 
Sep 17 12:08:49 168-11-26-111 pulsar[23776]: ... 5 more

Documentation

  • doc-required
    (Your PR needs to update docs and you will update later)

  • doc-not-needed
    (Please explain why)

  • doc
    (Your PR contains doc changes)

  • doc-complete
    (Docs have been already added)

Matching PR in forked repository

PR in forked repository: (https://github.com/Technoboy-/pulsar/pull/7)

@Technoboy- Technoboy- changed the title Set log level to warn when topic policy reader occurs AlreadyClosed… Set log level to warn when topic policy reader occurs AlreadyClosedException Sep 26, 2022
@Technoboy- Technoboy- changed the title Set log level to warn when topic policy reader occurs AlreadyClosedException [improve][broker] Set log level to warn when topic policy reader occurs AlreadyClosedException Sep 26, 2022
@Technoboy- Technoboy- self-assigned this Sep 26, 2022
@Technoboy- Technoboy- added this to the 2.12.0 milestone Sep 26, 2022
@Technoboy- Technoboy- closed this Sep 26, 2022
@Technoboy- Technoboy- reopened this Sep 26, 2022
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Sep 26, 2022
@merlimat merlimat merged commit e092064 into apache:master Sep 26, 2022
@Technoboy- Technoboy- deleted the log-to-warn branch September 14, 2023 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/broker doc-not-needed Your PR changes do not impact docs ready-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants