Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 299227 - Repo manager should not reset the suffix while updating the repo info
Summary: Repo manager should not reset the suffix while updating the repo info
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.6 M6   Edit
Assignee: John Arthorne CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-10 21:44 EST by Meng Xin Zhu CLA
Modified: 2010-02-09 11:46 EST (History)
2 users (show)

See Also:


Attachments
Repo manager should remember suffix when updating the repo info (932 bytes, patch)
2010-01-11 21:36 EST, Meng Xin Zhu CLA
john.arthorne: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Meng Xin Zhu CLA 2010-01-10 21:44:50 EST
Build Identifier: 3.6 M4

                protected IRepository basicGetRepository(URI location) {
                                                  ......................
                                                  IRepository repo = (IRepository)
info.repository.get();
                                                  //update our repository info because the
repository may have changed
                                                  if (repo != null)
                                                                   addRepository(repo, false, null);
                                                  return repo;
                                 }
                }

The comment tells me the repo may have changed, so update the repository
info. If so, why still returns the cached repo though the real repo
might have changed? Why reset the known suffix for that repo even if
it's necessary to update the repo info? My understand is that the suffix
escalates the hit rate of loading when there are multiple repo
factories. If the repo info records a suffix for the location, repo
manager would firstly use the factory that is bind to the suffix. It's
also a rare situation that the type of repo is changed. So it would be
higher hit rate to load the repo again if keeping the value of suffix.

Reproducible: Always
Comment 1 Pascal Rapicault CLA 2010-01-11 09:19:25 EST
Meng, it would be good if you could produce a patch. Thx
Comment 2 Meng Xin Zhu CLA 2010-01-11 21:36:23 EST
Created attachment 155818 [details]
Repo manager should remember suffix when updating the repo info
Comment 3 Meng Xin Zhu CLA 2010-01-11 21:38:35 EST
Comment on attachment 155818 [details]
Repo manager should remember suffix when updating the repo info

it's created against HEAD
Comment 4 John Arthorne CLA 2010-01-12 08:55:56 EST
Thanks for the patch!
Comment 5 John Arthorne CLA 2010-02-09 11:46:19 EST
Fix released in HEAD. Thanks for the patch!