Maven virtual registry: avoid copy operation during upload

🔥 Problem

Similar to Avoid the copy operation during Generic Package... (#429060 - closed).

The Maven virtual registry uses the workhorse accelerated uploads. In the past, there were performance hits in this approach due to the underlying logic doing a copy operation on object storage.

That copy operation can now be completely avoided with a few updates.

🚒 Solution

  • Add a new column named file_final_path to the virtual_registries_packages_maven_cached_responses table with text type and 1024 char length.
  • Pass two new keyword arguments to authorize_workhorse! method.
    • use_final_store_path: true
    • final_store_path_root_id: <registry id>
  • look if we need to keep around the object_storage_key column or not. There is a model callback associated to it.
Edited by David Fernandez