On Wed, Apr 28, 2010 at 11:07:08PM -0500, Shawn Walker wrote:
> webrev:
> http://cr.opensolaris.org/~swalker/pkg-file/

client.py:

  - lines 2455 - 2475: What is this code for?  The transport shouldn't
    raise any urllib exceptions any more.  The CatalogRefreshException
    is actually a vestige of the previous transport.  We can probably
    just remove that exception entirely and raise a TransportFailures
    if any catalogs are unsuccessfully refreshed.

transport/engine.py:

  - lines 170, 171 and 268, 269:  You've defined piplined_protocols.
    This might be clearer if written as:

    if conn_time == 0 and proto in piplined_protocols:

    The stats engine accounts for connection time as a separate value.
    Have you verified that these changes still lead to appropriate
    repository selection when faced with a large number of mirrors and
    origins?

  - line 189, 299, 769: How about "if proto not in piplined_protocols" ?


transport/transport.py:

  - lines 176 and 246:  Calling this "all" seems like a misnomer, since
    you don't get all caches.  Instead, you get just the ones that were
    configured without a specific publisher.  I think this needs a more
    self-explanatory name.  How about "__any" or "__uncategorized"?

  - lines 311, 316, and 317:  I'm a little nervous about comparing these
    two error codes, especially since there's potential for overlap
    between the HTTP response code space and the errno space.

    I wonder if we could add some properties to TransportProtoError that
    return True if they're the condition we're looking for.  E.g. if
    e.not_found would be true if the proto is http and the error code is
    404, or the proto is file and the error code is ENOENT.

    Another possibility would be to create our own set of error codes,
    but that might be more complicated.

  - lines 1487-1491:  Although you've already explained some of this on
    lines 289-293, I'd appreciate it if you would amend this comment to
    be explicit about the use of perfer_remote.  It's a workaround for
    one situation where we actually want to go remote if we can.  All of
    the rest of the code should be using the quality mechanisms in the
    transport to decide this.  Preferring remote is a special case for
    search where it's actually better to go remote first.

-j
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to