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

Wrong file name used when log file exists checking #181

Closed
CarpenterLee opened this issue Oct 15, 2018 · 0 comments · Fixed by #182
Closed

Wrong file name used when log file exists checking #181

CarpenterLee opened this issue Oct 15, 2018 · 0 comments · Fixed by #182
Labels
kind/bug Category issues or prs related to bug.

Comments

@CarpenterLee
Copy link
Contributor

CarpenterLee commented Oct 15, 2018

Issue Description

Type: bug report

Describe what happened (or what feature you want)

DateFileLogHandler.logFileExits() method uses a wrong log file name when checking log file exists, this will lead trying to recreate the log file at every log writing, which will cause performance problem.

Describe what you expected to happen

Use the right log file name when exists checking.

How to reproduce it (as minimally and precisely as possible)

  1. Invoke RecordLog.info() in high concurrency;
  2. Use jstack pid to see the stack trace of the current process, then we will see many threads BLOCKED at com.alibaba.csp.sentinel.log.DateFileLogHandler.publish().

Tell us your environment

None.

Anything else we need to know?

None.

@sczyh30 sczyh30 added the kind/bug Category issues or prs related to bug. label Oct 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Category issues or prs related to bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants