feat: retrieve sftp file attrs onces instead multiple time - #44625
Merged
Conversation
potiuk
approved these changes
Dec 6, 2024
potiuk
left a comment
Member
There was a problem hiding this comment.
Very Cool! Thanks for also doing performance checks!
Member
|
Intermittent error - not related. Merging. |
Ohashiro
pushed a commit
to Ohashiro/airflow
that referenced
this pull request
Dec 6, 2024
got686-yandex
pushed a commit
to got686-yandex/airflow
that referenced
this pull request
Jan 30, 2025
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
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.
Adding a new method for the
SFTPHookto retrieve all files including their sftp attributes.Currently, when listing files, all files are retrieved first and then another request is sent for each file to retrieve the file attributes. Listing many files slows down this behavior.
I tested the performance with 500 files and it dropped from about 49 seconds to 1-2 seconds.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in newsfragments.