Skip to content

Allow queuing/deletion of batched migration in transaction

Krasimir Angelov requested to merge enqueue-delete-batched-migration-in-txn into master

What does this MR do and why?

With !87715 (merged) we require queue_batched_background_migration and delete_batched_background_migration not to run in transaction. This stated to cause problems for migrations tests during development:

With the promotion of batched migrations as the default and recommended way to do background migrations we'll see more of these complaints, which result in slowed down development and less than ideal experience for developers.

Seems like the root cause is in the way we revert the schema between test examples, more details can be found here - !88545 (comment 968494255).

While we should look into this and fix it, as it's not the expected behavior, I think we should just allow this two helpers to run inside a transaction. They execute only DML statements (SELECT/INSERT/DELETE) and there is no reason to restrict them this way, other than "Let's do all batched migration operation outside transaction".

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading