[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Are there order effects in composite repositories?

Though it is true that children repos are consulted in order, this is a not a contract.
Why don't we have mirroring support for things served from archive?
Also rather than changing the repos, why can't we have http-level redirect for these URLs?

On 2011-02-19, at 3:23 AM, Thomas Hallgren wrote:

Hi David,

For the meta-data, order doesn't matter since that would break the whole idea of using a SAT algorithm to come up with a resolution. p2 will build a set of all UI's in the repository (composite or not), and then feed that to the SAT solver. The solver then comes up with a plan. The order of children doesn't affect the content of the set.

For the artifacts, I know that url's with 'file:' are consulted first so that unnecessary download traffic is avoided. I'm almost certain that with the 'file' priority out of the way, the artifact repositories are consulted in the order they are listed.

Regards,
Thomas Hallgren

On 2011-02-19 08:01, David M Williams wrote:
In particular, is it part of the "spec" or API? (That is, I'm not just asking about current implementation).

I think this issue will become more relevant, especially for eclipse.org, now that p2 is getting "old" :)  because some repos that were on 'downloads' should at some point move to 'archives'.

Let me elaborate. In a composite repo, many of us might have child repos that might be similar to the following fictional URLs ...

<children size='3'>
   <child location='http://archive.eclipse.org/webtools/R3.2.0/' />
   <child location='http://archive.eclipse.org/webtools/R3.2.1/' />
   <child location='http://download.eclipse.org/webtools/R3.2.2/' />
</children>

Is that order, above, treated differently than the order, below? Which repo is searched (or matched) first for artifacts?

<children size='3'>
   <child location='http://download.eclipse.org/webtools/R3.2.2/' />
   <child location='http://archive.eclipse.org/webtools/R3.2.1/' />
   <child location='http://archive.eclipse.org/webtools/R3.2.0/' />
</children>

This can become important, for example, if some artifact is the same in all three repositories .... that is, the version/qualifier is unchanged. If the "archive" repos are tried first, then the result would not be mirrored, and always come from eclipse.org directly, it seems. The opposite would be desired, that 'downloads' repos would be "searched/matched" first, and if found there, then, via the magic of the mirrors URL, would have a chance of coming from a mirror, thus being faster for many users (and off-loading some bandwidth from eclipse.org).

So, is there a way to make sure 'download' URLs are matched first? Should they come first in list, or last ... or is the outcome indeterminable?

Any advice?

Feel free to comment in bug 330134 ... which was opened some time ago to "investigate" this issue ... but, I'm hoping some p2 expert knows the answer, and I won't have to investigate :)

https://bugs.eclipse.org/bugs/show_bug.cgi?id=330134

 
Thanks,


_______________________________________________ p2-dev mailing list p2-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/p2-dev

_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev