19362: Update API docs.
[arvados.git] / lib / controller / federation / list.go
index a9ac03ee5d2ecadaaccd064e5ee133093aadd6bc..039caac574e479bdad181dfeed745dd3255640cf 100644 (file)
@@ -22,12 +22,6 @@ import (
 // methods for other types; see generate.go.
 
 func (conn *Conn) generated_CollectionList(ctx context.Context, options arvados.ListOptions) (arvados.CollectionList, error) {
-       if options.ClusterID != "" {
-               // explicitly selected cluster
-               options.ForwardedFor = conn.cluster.ClusterID + "-" + options.ForwardedFor
-               return conn.chooseBackend(options.ClusterID).CollectionList(ctx, options)
-       }
-
        var mtx sync.Mutex
        var merged arvados.CollectionList
        var needSort atomic.Value
@@ -119,6 +113,11 @@ func (conn *Conn) splitListRequest(ctx context.Context, opts arvados.ListOptions
                _, err := fn(ctx, conn.cluster.ClusterID, conn.local, opts)
                return err
        }
+       if opts.ClusterID != "" {
+               // Client explicitly selected cluster
+               _, err := fn(ctx, conn.cluster.ClusterID, conn.chooseBackend(opts.ClusterID), opts)
+               return err
+       }
 
        cannotSplit := false
        var matchAllFilters map[string]bool