Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 216047 - [prov] Repositories reading from a local repo create a temporary copy of the index file
Summary: [prov] Repositories reading from a local repo create a temporary copy of the ...
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M6   Edit
Assignee: Tim Mok CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-21 15:33 EST by Tim Mok CLA
Modified: 2008-02-28 12:14 EST (History)
2 users (show)

See Also:
john.arthorne: review+


Attachments
Local Index Check v01 (3.71 KB, patch)
2008-01-23 16:50 EST, Tim Mok CLA
no flags Details | Diff
Local Index Check v02 (3.94 KB, patch)
2008-02-22 14:49 EST, Tim Mok CLA
timothym: review?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Mok CLA 2008-01-21 15:33:06 EST
I noticed in SimpleMetadataRepositoryFactory and SimpleArtifactRepositoryFactory that they both create temporary copies of the index files. This is fine for reading remote repositories but seems odd for local repositories.

I propose changing it to reading local repositories directly instead of making a copy of the index. I can make the changes as part of my work on caching metadata since I'm refactoring most of the code already. Just wondering if there are any reasons to keep the current method of reading index files.
Comment 1 Tim Mok CLA 2008-01-23 16:50:46 EST
Created attachment 87710 [details]
Local Index Check v01

Patch changes:

+Added a check to SimpleArtifactRepositoryFactory#load(*) to use ECFTransport only when the index file is from a remote location.

The local file check for SimpleMetadataRepositoryFactory#load(*) will be included in the metadata caching bug report.

I'm going to do a bit more testing on this. I'll flag it for review when it's ready.
Comment 2 John Arthorne CLA 2008-02-21 15:36:45 EST
Tim will update the patch, then I will review/release.
Comment 3 Tim Mok CLA 2008-02-22 14:49:26 EST
Created attachment 90510 [details]
Local Index Check v02

Patch changes:

+ Respun the patch to match the changes since the first patch was posted.
Comment 4 John Arthorne CLA 2008-02-28 12:14:24 EST
Fix released.