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

Large migrations stored in S3 are downloaded, even when they aren't run. #3760

Open
OneGeek opened this issue Oct 12, 2023 · 2 comments
Open

Comments

@OneGeek
Copy link

OneGeek commented Oct 12, 2023

Which version and edition of Flyway are you using?

9.22.3 Community

Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)

Maven plugin (9.21.1)

Which database are you using? (Type & version)

MariaDB 10.6

Which operating system are you using?

Windows (10/11) & Linux (Amazon Linux 2)

What did you do? (Please include the content causing the issue, any relevant configuration settings, the SQL statement(s) that failed (if any), and the command you ran)

I have a 1.3GB migration stored in S3.
I ran flyway repair & flyway migrate against an empty DB, and against a DB where flyway migrate has already been run.

What did you expect to see?

In the case where the DB is empty, I expect the large migration to not be downloaded when running flyway repair, and then to be downloaded once from S3, then applied, when running flyway migrate

In the case where the DB is populated, and the large migration has already run, I expect flyway to not download the migration at all for either repair or migrate operations.

What did you see instead?

In the case where the DB is empty, the migration is downloaded multiple times. Once when running repair and once when running migrate.

In the case where the DB is populated, the migration is downloaded despite already having been run.

In both cases, due to the size of the migration file, multiple minutes are spent redownloading the file when it doesn't seem like it should be necessary to do so if the migration isn't going to run.

OneGeek added a commit to OneGeek/flyway that referenced this issue Oct 12, 2023
… from S3 rather than directly computing it to avoid downloading the content before it is necessary.

Addresses flyway#3760
@mauroEkotrope
Copy link

Hoping this issue gets resolved soon; it just cost me 45 minutes!

@giacomoarru
Copy link

I have the same issue. S3 migrations are broken and they cannot be used for any real project, since it takes forever to run the software. Migrations should be downloaded only if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants