-
Notifications
You must be signed in to change notification settings - Fork 15k
Resolve OOM When Reading Large Logs in Webserver #49470
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
Open
jason810496
wants to merge
37
commits into
apache:main
Choose a base branch
from
jason810496:refactor/rework-webserver-oom-for-large-log-read
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Resolve OOM When Reading Large Logs in Webserver #49470
jason810496
wants to merge
37
commits into
apache:main
from
jason810496:refactor/rework-webserver-oom-for-large-log-read
+1,166
−302
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d47a49b
to
2f5a202
Compare
4e1bcb4
to
358f231
Compare
358f231
to
9900b2e
Compare
- Fix events utils - Add convert_list_to_stream, mock_parsed_logs_factory utils - Fix the following test after refactoring FileTaskHandler - test_file_task_handler_when_ti_value_is_invalid - test_file_task_handler - test_file_task_handler_running - test_file_task_handler_rotate_size_limit - test__read_when_local - test__read_served_logs_checked_when_done_and_no_local_or_remote_logs - test_interleave_interleaves - test_interleave_logs_correct_ordering - test_interleave_logs_correct_dedupe - Add new test for refactoring FileTaskHandler - test__stream_lines_by_chunk - test__log_stream_to_parsed_log_stream - test__sort_key - test__is_sort_key_with_default_timestamp - test__is_logs_stream_like - test__add_log_from_parsed_log_streams_to_heap
- sequential yield instead of parallel yield for all log_stream
- don't concat buffer with empty str, yield directly from buffer
Fix wasb test, spelling
3d90512
to
df20991
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
related issue: #45079
related PR: #45129
related discussion on slack: https://apache-airflow.slack.com/archives/CCZRF2U5A/p1736767159693839
Why
In short, this PR aims to eliminate OOM issues by:
yield
generators instead of returning a list of strings)More detailed reasoning is already described in the linked issue.
Due to too many conflicts with the old PR (#45129), this PR reworks the changes on top of the latest
FileTaskHandler
.What
This PR ports the original changes from #45129 to the current version of
FileTaskHandler
with the following updates:Note: Recent Changes in
FileTaskHandler
StructuredLogMessage
to represent each log record Render structured logs in the new UI rather than showing raw JSON #46827RemoteLogIO
interface for remote log handling Rework remote task log handling for the structlog era. #48491