Skip to content

Wrong file name used when log file exists checking #181

Closed
@CarpenterLee

Description

@CarpenterLee

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategory issues or prs related to bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions