From: Tom Clegg Date: Thu, 6 Feb 2020 16:09:32 +0000 (-0500) Subject: 16133: Don't take multiple hops when getting collections. X-Git-Tag: 2.0.0~11^2~1 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/14bb7aa24ed7a06ce94e59f64ab32bdb44641168 16133: Don't take multiple hops when getting collections. Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- diff --git a/lib/controller/federation/conn.go b/lib/controller/federation/conn.go index 4d4141ffd6..2aebc0e970 100644 --- a/lib/controller/federation/conn.go +++ b/lib/controller/federation/conn.go @@ -231,7 +231,13 @@ func (conn *Conn) CollectionGet(ctx context.Context, options arvados.GetOptions) // UUID is a PDH first := make(chan arvados.Collection, 1) err := conn.tryLocalThenRemotes(ctx, func(ctx context.Context, remoteID string, be backend) error { - if remoteID != "" && strings.Contains(downstream, remoteID) { + if remoteID != "" && downstream != "" { + // If remoteID isn't in downstream, we + // might find the collection by taking + // another hop, but we don't bother: + // token salting and blob signature + // rewriting don't work over multiple + // hops. return notFoundError{} } c, err := be.CollectionGet(ctx, options)