Skip to content

[INLONG-8180][Agent] Improve the efficiency and safety of log file reading - #8182

Merged
dockerzhang merged 10 commits into
apache:masterfrom
justinwwhuang:develop
Jun 14, 2023
Merged

[INLONG-8180][Agent] Improve the efficiency and safety of log file reading#8182
dockerzhang merged 10 commits into
apache:masterfrom
justinwwhuang:develop

Conversation

@justinwwhuang

Copy link
Copy Markdown
Contributor

Prepare a Pull Request

[INLONG-8180][Agent] improve the efficiency and safety for log file reading

Motivation

case the agent oom when it meets one line that was 1G long;the agent take most cpu just to read the file

Modifications

1、limit the length of one time reading,avoid oom
2、read multi lines one time to reduce io

Verifying this change

(Please pick either of the following options)

  • This change is a trivial rework/code cleanup without any test coverage.

  • This change is already covered by existing tests, such as:
    (please describe tests)

  • This change added tests and can be verified as follows:

    (example:)

    • Added integration tests for end-to-end deployment with large payloads (10MB)
    • Extended integration test for recovery after broker failure

Documentation

  • Does this pull request introduce a new feature? (yes / no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
  • If a feature is not applicable for documentation, explain why?
  • If a feature is not documented yet in this PR, please create a follow-up issue for adding the documentation

…eading

1、limit the length of one time reading,avoid oom
2、read multi lines one time to reduce io
@dockerzhang dockerzhang changed the title [INLONG-8180][Agent] improve the efficiency and safety for log file r… [INLONG-8180][Agent] improve the efficiency and safety for log file reading Jun 7, 2023
@dockerzhang

Copy link
Copy Markdown
Contributor

Please rebase from the master to solve the failed UT.

@dockerzhang
dockerzhang requested a review from EMsnap June 8, 2023 02:35
@healchow healchow changed the title [INLONG-8180][Agent] improve the efficiency and safety for log file reading [INLONG-8180][Agent] Improve the efficiency and safety of log file reading Jun 8, 2023
@dockerzhang
dockerzhang merged commit 1d7cfb7 into apache:master Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Improve][Agent] Improve the efficiency and safety of log file reading

5 participants