If I understood you right, you suggest to improve migrate_generate_event
to accept MigrationState* instead of int* state (which is pointing to
field MigrationState.state in all usages), and get error reason from
MigrationState.error, if the new state is MIGRATION_STATE_FAILED, is it?
That sounds reasonable, thanks!
But I'm not sure if I got the idea of changing migrate_set_error
correctly, can you explain in more details, please?
On 2/20/24 10:39, Peter Xu wrote:
On Thu, Feb 15, 2024 at 05:27:58PM +0500, Roman Khapov wrote:
migrate_set_state(&mis->state, MIGRATION_STATUS_COLO,
- MIGRATION_STATUS_COMPLETED);
+ MIGRATION_STATUS_COMPLETED, NULL);
Instead of enforcing migrate_set_error() to always pass an error, maybe we
can allow migrate_generate_event() to fetch s->error in FAILED state, if
that hint ever existed?
--
Best regards,
Roman Khapov