Catalog every store object a release points at (idempotent)
Source:R/asset_store.R
asset_catalog_register.RdA release that lands must catalog what it published: a pointer at an object the catalog lacks fails
store_publish_gate() and leaves the object invisible to verify_asset_store.R and the garbage collector.
Finds the keys of urls missing from catalog (asset_catalog_missing()), asks fetch for a local copy of
each (bytes and md5 come from the file), builds their rows with asset_catalog_rows() and appends them with
asset_catalog_add(). A second call finds nothing missing and returns catalog unchanged.
Arguments
- catalog
the current catalog
- urls
pointer URLs of the release
- payload_hash
payload hash of each URL's object (
NAwhen unknown), length ofurls- enc
encoding tag of each URL's object (
NAwhen unknown), length ofurls- first_ver
the release registering the objects
- fetch
function(keys)returning one local file path per key
Details
payload_hash / enc are what the key was made from. asset_catalog_check() verifies that
content_hash_encoded(payload_hash, enc) is the key's hash, so a wrong encoding tag stops here; give
NA for both when the payload is unknown (the legacy convention of the existing usa05 rows).