Skip to content

MetricWriter has a bug that may not have an index file #796

@interxd

Description

@interxd

问题描述

MetricWriter存在隐含bug
MetricWriter构造函数中将lastSecond初始化为当前时间戳,如果在同一时间戳调用write函数写入log,走下面的分支,可能出现没有写索引文件的bug:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/loggingIssues or PRs related to logging of Sentinelkind/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