Transfer topic avatars on organization group transfer

What does this MR do?

Adds async avatar duplication when transferring topics between organizations during group transfer.

When a topic with an avatar is transferred to a new organization, the avatar file needs to be copied to the newly created topic in the target organization. This is done asynchronously via Organizations::TransferTopicAvatarWorker to avoid I/O during the transaction.

Details

  • New Organizations::TransferTopicAvatarWorker that copies avatar from source topic to target topic
  • Worker is idempotent and skips if target already has an avatar or source has none
  • Scheduled via group.run_after_commit_or_now so it only runs after the transfer transaction commits
  • Uses defer_on_database_health_signal for the topics table

Part of #594592 (closed)

Depends on !243722 (merged)

Merge request reports

Loading
Loading