Starts in:
1 DAY
22 HRS
33 MIN
0 SEC
Starts in:
1 D
22 H
33 M
0 S
Open Closed

Request for Guidance on Extending Migration Framework for ALGORITHM=INSTANT Support #7702


User avatar
0
portx-dev created

I hope this message finds you well.

We are currently using your ABP Commercial framework for our project, and we are facing a challenge related to database migrations. Specifically, we need to utilize the ALGORITHM=INSTANT option in MySQL for certain ALTER TABLE operations to avoid database locks and ensure zero-downtime deployments. However, we have noticed that the current migration framework does not support this option.

We would like to inquire if there is any possibility to extend or customize the migration framework to accommodate the use of ALGORITHM=INSTANT. If there is an existing way to achieve this, we would greatly appreciate any guidance or documentation you could provide.

Thank you in advance for your assistance. We look forward to your advice on how best to proceed.

Best regards,

  • ABP Framework version: v8.2
  • UI Type: Angular
  • Database System: EF Core (MySQL.)

15 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    We are using the standard EF Core to migrate the database.

    Can you use ALGORITHM=INSTANT correctly without abp?

  • User Avatar
    0
    portx-dev created
    • Yes, I know that you are using EF Core.
    • ALGORITHM=INSTANT can also be used in MySQL 8.0.

    Is there a way to use ALGORITHM=INSTANT using EF Core?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Is there a way to use ALGORITHM=INSTANT using EF Core?

    I have no idea about this.

    How do you use ALGORITHM=INSTANT without EF Core?

  • User Avatar
    0
    portx-dev created

    Thank you for reaching out.

    It is possible to use ALGORITHM=INSTANT without ABP Commercial. However, when using EF Core for migrations, applying specific options like ALGORITHM=INSTANT to an ALTER TABLE command might require manually running the SQL or customizing the migration scripts to include this option.

    If EF Core migrations do not support this option by default, we might need to consider executing custom scripts before or after the migration to ensure the database lock is minimized.

    Our goal is to achieve zero-downtime releases by minimizing database locks. We would appreciate any further guidance or suggestions you could provide on this matter.

    Best regards,

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can add your custom SQL statement during migration

    see https://learn.microsoft.com/en-us/ef/core/managing-schemas/migrations/operations

  • User Avatar
    0
    portx-dev created

    Thank you for the suggestion. I understand that using migrationBuilder.Sql allows us to add custom SQL during migration. However, I'm looking for a way to achieve this directly through EF Core's built-in migration functionality without having to manually insert SQL statements.

    Our goal is to keep our migration process as consistent and maintainable as possible within the framework provided by EF Core. If there is an alternative approach or any upcoming features that might support this requirement natively, I would appreciate any guidance or suggestions you could offer.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    I have no experience in this case, sorry. : ( It related to EF Core instead of ABP Framework

  • User Avatar
    0
    portx-dev created

    Ok, where should I contact for help?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    We can only solve problems related to abp. We have no relevant experience in your case.

    Sorry for that.

    You can try to google it or ask for a solution in EF Core https://github.com/dotnet/efcore/issues/new/choose

  • User Avatar
    0
    portx-dev created

    I understand. First of all, does ABP Commercial have a system to support non-startup releases?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    What do you mean non-startup releases?

    Can you explain it in detail?

    Thanks

  • User Avatar
    0
    portx-dev created

    sorry zero-downtime deployments

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    This belongs to devops scope, abp is just a net core web application.

  • User Avatar
    0
    portx-dev created

    ok,thx

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    : )

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06