Skip to content

Conversation

@wolfstudy
Copy link
Member

@wolfstudy wolfstudy commented Mar 30, 2022

Signed-off-by: xiaolongran xiaolongran@tencent.com

Motivation

When unacked messages reached to max unacked messages, the following logs will be quickly output to the log file, causing the broker's log file to switch within a short period of time.

image

Modifications

Fix logger lever from warn to debug when uancked threshold is limited

Signed-off-by: xiaolongran <xiaolongran@tencent.com>
@wolfstudy wolfstudy self-assigned this Mar 30, 2022
Signed-off-by: xiaolongran <xiaolongran@tencent.com>
@wolfstudy wolfstudy added the doc-not-needed Your PR changes do not impact docs label Mar 30, 2022
@wolfstudy wolfstudy added this to the 2.11.0 milestone Mar 30, 2022
@merlimat
Copy link
Contributor

I believe in this case the log should really be at debug level. The information is already available in the topic stats for debugging purposes.

@wolfstudy
Copy link
Member Author

I believe in this case the log should really be at debug level. The information is already available in the topic stats for debugging purposes.

Yes, when the unack reaches the maximum threshold, we can get the number of unackedMessages through pulsar-admin topics stats, and get the maxUnackedMessage threshold from pulsar-admin namespace policies. But when this threshold is triggered, Dispatcher read is blocked. This behavior is actively triggered by the broker, which is not transparent enough to the client-side. We still need a more intuitive form to quickly locate this problem. It seems a reasonable way to output the specified log information to the broker log file.

@wolfstudy
Copy link
Member Author

ping @merlimat @codelipenghui @hangc0276 @315157973 PTAL thanks

@wolfstudy
Copy link
Member Author

wolfstudy commented Apr 13, 2022

Which approach do we prefer here:

  1. We directly change the log level to debug
  2. Introduce log flow control to limit the frequency of log output

@hangc0276
Copy link
Contributor

IMO,we'd better change the log level from warn to debug, and can get the unack info from topic stats.

@wolfstudy
Copy link
Member Author

IMO,we'd better change the log level from warn to debug, and can get the unack info from topic stats.

OK i will fix this change

Signed-off-by: xiaolongran <xiaolongran@tencent.com>
@wolfstudy wolfstudy changed the title Add rate logger for repo Fix logger lever from warn to debug when uancked threshold is limited Apr 14, 2022
@wolfstudy
Copy link
Member Author

ping @merlimat @codelipenghui @hangc0276 @315157973 PTAL thanks

@wolfstudy
Copy link
Member Author

/pulsarbot run-failure-checks

1 similar comment
@wolfstudy
Copy link
Member Author

/pulsarbot run-failure-checks

@wolfstudy wolfstudy merged commit f9cfc3e into apache:master Apr 14, 2022
aparajita89 pushed a commit to aparajita89/pulsar that referenced this pull request Apr 18, 2022
…apache#14950)

* Add rate logger for repo

Signed-off-by: xiaolongran <xiaolongran@tencent.com>

* fix log info

Signed-off-by: xiaolongran <xiaolongran@tencent.com>

* fix comments

Signed-off-by: xiaolongran <xiaolongran@tencent.com>
Nicklee007 pushed a commit to Nicklee007/pulsar that referenced this pull request Apr 20, 2022
…apache#14950)

* Add rate logger for repo

Signed-off-by: xiaolongran <xiaolongran@tencent.com>

* fix log info

Signed-off-by: xiaolongran <xiaolongran@tencent.com>

* fix comments

Signed-off-by: xiaolongran <xiaolongran@tencent.com>
@Shawyeok
Copy link
Contributor

I've open a follow up PR #15767 to change other log lines, PTAL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-not-needed Your PR changes do not impact docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants