7253: update BlockIterWithDuplicates to return any errors through Manifest, rather...
[arvados.git] / services / datamanager / collection / collection.go
index 7102ec3c054bb24df5e3e0979784b9c08b3949ed..df6852687a621fccbb9606b99ae30cfa81bf3dca 100644 (file)
@@ -274,7 +274,7 @@ func ProcessCollections(arvLogger *logger.Logger,
                        collection.ReplicationLevel = defaultReplicationLevel
                }
 
-               manifest := manifest.Manifest{sdkCollection.ManifestText}
+               manifest := manifest.Manifest{Text: sdkCollection.ManifestText}
                manifestSize := uint64(len(sdkCollection.ManifestText))
 
                if _, alreadySeen := UUIDToCollection[collection.UUID]; !alreadySeen {
@@ -297,6 +297,11 @@ func ProcessCollections(arvLogger *logger.Logger,
                        }
                        collection.BlockDigestToSize[block.Digest] = block.Size
                }
+               if manifest.Err != nil {
+                       err = manifest.Err
+                       return
+               }
+
                collection.TotalSize = 0
                for _, size := range collection.BlockDigestToSize {
                        collection.TotalSize += size