Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 267569 - [mirror] Artifact repository file transfer needs to be made more robust
Summary: [mirror] Artifact repository file transfer needs to be made more robust
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.5   Edit
Hardware: PC All
: P2 major (vote)
Target Milestone: 3.5 M7   Edit
Assignee: Matthew Piggott CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 248602
  Show dependency tree
 
Reported: 2009-03-08 23:27 EDT by Pascal Rapicault CLA
Modified: 2009-03-25 15:34 EDT (History)
4 users (show)

See Also:


Attachments
Mirroring patch (21.33 KB, patch)
2009-03-18 15:03 EDT, Matthew Piggott CLA
no flags Details | Diff
Mirroring patch (21.34 KB, patch)
2009-03-18 17:44 EDT, Matthew Piggott CLA
dj.houghton: iplog+
Details | Diff
MirrorRequestTest patch (9.87 KB, patch)
2009-03-23 16:16 EDT, Matthew Piggott CLA
no flags Details | Diff
MirrorRequestTest patch (11.29 KB, patch)
2009-03-25 13:45 EDT, Matthew Piggott CLA
dj.houghton: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Rapicault CLA 2009-03-08 23:27:29 EDT
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.
Comment 1 John Arthorne CLA 2009-03-09 08:43:43 EDT
*** Bug 248832 has been marked as a duplicate of this bug. ***
Comment 2 Matthew Piggott CLA 2009-03-12 17:24:51 EDT
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.)
Comment 3 Pascal Rapicault CLA 2009-03-13 09:48:02 EDT
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.
Comment 4 Matthew Piggott CLA 2009-03-18 15:03:30 EDT
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.
Comment 5 Matthew Piggott CLA 2009-03-18 17:44:53 EDT
Created attachment 129297 [details]
Mirroring patch

Fixes the status message when a descriptor already exists in the destination.
Comment 6 Matthew Piggott CLA 2009-03-23 16:16:29 EDT
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)
Comment 7 Matthew Piggott CLA 2009-03-25 13:45:05 EDT
Created attachment 129871 [details]
MirrorRequestTest patch

Small fix
Comment 8 DJ Houghton CLA 2009-03-25 15:33:41 EDT
Patch released to HEAD. Thanks, Matthew.