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

[backport]: fix GetLastLine core #1996

Merged
merged 12 commits into from
Dec 31, 2024
Merged

Conversation

quzard
Copy link
Collaborator

@quzard quzard commented Dec 27, 2024

  • 修复了因特定日志条目导致的崩溃问题
    例如:\n2021-08-25T07:00:00.000000000Z stdout F xxx 导致的日志崩溃。

  • 优化了在行尾多行模式匹配到 "xxx\nend" 时的日志回退逻辑
    这种情况下应该因为end没有换行符,应该回退所有日志

  • 解决了行尾多行模式下当 containerd 日志以 "xxx\nend\npart log" 格式出现时的日志回退问题
    例如,在遇到以下日志序列时,如果 "end log" 匹配成功,则应将日志回退至 "2021-08-25T07:00:00.000000000Z stdout F end log" 的位置,回退行数为3行:

    2021-08-25T07:00:00.000000000Z stdout F unmatch log
    2021-08-25T07:00:00.000000000Z stdout F unmatch log
    2021-08-25T07:00:00.000000000Z stdout F unmatch log
    2021-08-25T07:00:00.000000000Z stdout F end log
    2021-08-25T07:00:00.000000000Z stdout P unmatch log
    2021-08-25T07:00:00.000000000Z stdout P unmatch log
    2021-08-25T07:00:00.000000000Z stdout P unmatch log
    

@quzard quzard changed the title fix GetLastLine core [backport]: fix GetLastLine core Dec 30, 2024
@quzard quzard merged commit 839de1a into alibaba:2.1 Dec 31, 2024
15 checks passed
@henryzhx8 henryzhx8 added the bug Something isn't working label Dec 31, 2024
@henryzhx8 henryzhx8 added this to the v2.1 milestone Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants