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

[Log Collector] Change log file names to old format #3647

Merged
merged 2 commits into from
May 25, 2023

Conversation

TomerShor
Copy link
Member

Issue:
We have seen in the field that the current implementation, of storing the log files in the <project>/<run_uid>_<pod_name> format, proves to be problematic when getting the log files in systems with an extensive number of runs.
The issue happens when listing the logs directory to find the latest run log. Our flex fuse that mlrun is using for storing the logs cannot handle listing a directory with >2000 runs in it, and the log collector sidecar gets stuck.

Fix:
To fix it, we revert back to the old log file path format - <project>/<run_uid>.
We have done some research and found that currently each run has only one pod, and thus it will have only one file.
This enables us to remove the listDir operation to find the most recent log file, and just use the constant filename and getting it directly.

The change is relevant both in the log collector and in the API's legacy method.

Copy link
Contributor

@Tankilevitch Tankilevitch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job, minor comment

return nil
}); err != nil {
// get run log file path
runLogFilePath := s.resolvePodLogFilePath(projectName, runUID)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
runLogFilePath := s.resolvePodLogFilePath(projectName, runUID)
runLogFilePath := s.resolveRunLogFilePath(projectName, runUID)

@Tankilevitch Tankilevitch merged commit f6e96ed into mlrun:development May 25, 2023
14 checks passed
TomerShor added a commit to TomerShor/mlrun that referenced this pull request May 25, 2023
TomerShor added a commit to TomerShor/mlrun that referenced this pull request May 25, 2023
TomerShor added a commit to TomerShor/mlrun that referenced this pull request May 25, 2023
@TomerShor TomerShor deleted the lc-file-paths-old branch May 28, 2023 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants