Community
Participate
Working Groups
People have been encountering a variety of problems with our artifact mirroring support and this is very limiting for them (see for example http://dev.eclipse.org/mhonarc/lists/p2-dev/msg00969.html). I believe that the core problem is located in how we are doing the actual downloads of the artifacts that does not use the MirrorRequest class but some other code path that is not as robust.
*** Bug 248832 has been marked as a duplicate of this bug. ***
I've looked at rewriting Mirroring to use MirrorRequests and found two potential problems. The first is that MirrorRequest will only mirror a single ArtifactDescriptor per ArtifactKey, and the second is that baseline comparison might not be possible (or flaky) since the descriptor used by MirrorRequest isn't accessible. A possible solution might be to subclass MirrorRequest and replace the perform method (some internals would also need to be moved to protected.)
When I last looked at that, it was the direction I was taking. Also we need to make sure that we do *not* apply the processing steps on the artifacts.
Created attachment 129268 [details] Mirroring patch This patch adds a subclass of MirrorRequest for raw transfers (skipping processing steps) of artifacts. Mirroring has also been updated to take advantage of this new transfer mechanism, it also has a new option setValidate which performs a simple comparison of ArtifactDescriptors present in the source, with those found in the destination.
Created attachment 129297 [details] Mirroring patch Fixes the status message when a descriptor already exists in the destination.
Created attachment 129634 [details] MirrorRequestTest patch I've added a new test to MirrorRequestTest to test that in the event of a transfer failure the next mirror is tried. (The test tests: FileNotFound -> MD5 failure -> Success)
Created attachment 129871 [details] MirrorRequestTest patch Small fix
Patch released to HEAD. Thanks, Matthew.