tensorfs 0.3.86__tar.gz → 0.3.88__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of tensorfs might be problematic. Click here for more details.
- {tensorfs-0.3.86 → tensorfs-0.3.88}/Cargo.lock +3 -3
- {tensorfs-0.3.86 → tensorfs-0.3.88}/Cargo.toml +1 -1
- {tensorfs-0.3.86 → tensorfs-0.3.88}/PKG-INFO +1 -1
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/providers.rs +4 -4
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/source_artifact.rs +5 -3
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/store.rs +1 -1
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/transport/download.rs +184 -59
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/transport/http_reuse_tests.rs +6 -6
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/transport/mod.rs +2 -2
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/transport/pull.rs +1 -0
- tensorfs-0.3.88/crates/tensorfs-core/src/transport/sources.rs +517 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/transport/tests.rs +9 -2
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/source_download.rs +100 -52
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/source_prefixes.rs +48 -28
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-plane/API.md +48 -16
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-plane/Cargo.toml +4 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-plane/src/cuda.rs +2 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-plane/src/cursor.rs +12 -8
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-plane/src/device.rs +52 -19
- tensorfs-0.3.88/crates/tensorfs-plane/src/faults.rs +94 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-plane/src/host.rs +166 -58
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-plane/src/lib.rs +1 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-plane/src/plane.rs +111 -47
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-plane/tests/gpu.rs +190 -4
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-plane/tests/host_tier.rs +124 -6
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-py/src/plane.rs +18 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/pyproject.toml +1 -1
- {tensorfs-0.3.86 → tensorfs-0.3.88}/python/tensorfs/plane.py +4 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/python/tensorfs/plane.pyi +9 -0
- tensorfs-0.3.86/crates/tensorfs-core/src/transport/prefix.rs +0 -1094
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/Cargo.toml +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/build.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/examples/h3-swiglu-layout.md +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/examples/optional-cache-backfill.md +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/examples/resident-conversion.md +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/examples/resident_conversion_profile.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/asset_update.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/b64.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/bin/tfs/ckpt.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/bin/tfs/conform.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/bin/tfs/ensure.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/bin/tfs/fetch.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/bin/tfs/ingest.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/bin/tfs/main.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/bin/tfs/rd.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/bin/tfs/repo.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/bin/tfs/snap.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/bin/tfs/watch.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/cache_roots.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/canon.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/capability.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/catalog/lock.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/catalog.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/cbor.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/checkpoint.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/checkpoint_root.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/corpus.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/derived/adoption.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/derived/companion_tests.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/derived/estimate.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/derived/graft_tests.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/derived/group_commit_tests.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/derived/history_cost_tests.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/derived/part_rows_tests.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/derived/progress.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/derived/resume_tests.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/derived/retention.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/derived/roots.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/derived.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/descriptors.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/disk.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/dtype.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/durability.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/ensure/admission.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/ensure/flight.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/ensure.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/err.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/fetch.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/filesystem_identity.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/fill.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/fit.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/gc.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/header.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/home.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/ids.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/ingest/carrier.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/ingest/convert.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/ingest/custody.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/ingest/fingerprint.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/ingest/gguf.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/ingest/h3_lora.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/ingest/journal.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/ingest/mod.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/ingest/narrow.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/ingest/preflight.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/ingest/routes/anima.routes.json +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/ingest/routes/anima.spec.json +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/ingest/routes/sdxl.routes.json +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/ingest/routes/sdxl.spec.json +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/ingest/routes.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/ingest/source.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/ingest/stamp.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/ingest/transaction.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/jcs.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/keyed_roots.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/lib.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/limits.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/machine.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/manifest.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/meta.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/project.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/read.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/receipt.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/reclaim.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/registry.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/relation.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/repo_cache.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/repository.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/sha256.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/spec.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/staging.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/stats.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/storage.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/transport/api.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/transport/decisions.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/transport/http.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/transport/hub.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/transport/ledger.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/transport/memory.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/transport/policy.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/transport/push.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/transport/tests/tail.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/unsynced.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/src/vectors.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/additive_fields.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/anima_hf_profile.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/as_is.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/catalog_owner_probe.c +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/checkpoint_roots.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/civitai_anima.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/civitai_sdxl_profile.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/ensure.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/fd_budget.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/fd_headroom.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/fetch_faults.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/fetch_url_progress.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/fit.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/fixtures/repo_apply/blobs.jsonl +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/fixtures/repo_apply/expected_list.jsonl +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/fixtures/repo_apply/expected_repository.json +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/fixtures/repo_apply/expected_rows.jsonl +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/fixtures/repo_apply/header.cbor +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/fixtures/repo_apply/manifest.json +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/fixtures/repo_apply/mutation.json +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/foreign_json.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/h3_lora.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/h3_swiglu.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/home.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/hub_tls.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/import_tree.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/instrument_profiles.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/keyed_roots.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/liveness.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/qwen_image21_profile.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/read_plan.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/reclaim.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/reclaim_run.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/repo_cache.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/repo_store.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/resident_admission.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/routed_single_file.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/sha256_backends.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/sharded_cas.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/source_artifacts.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/source_plan.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/source_preflight.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/staging.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/store_boundaries.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/tensor_schema.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/transfer_memory.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/trust_index.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/version.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-core/tests/write_through.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-plane/src/bin/g1_vmm.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-plane/src/bin/g2_overlap.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-plane/src/bin/gpu_bench/mod.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-plane/src/io.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-plane/src/layout.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-plane/tests/common/mod.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-py/Cargo.toml +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-py/src/docs.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-py/src/ensure.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-py/src/errors.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-py/src/ingest.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-py/src/lib.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/crates/tensorfs-py/src/store.rs +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/python/tensorfs/__init__.py +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/python/tensorfs/_derived_channel.py +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/python/tensorfs/_ext.pyi +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/python/tensorfs/_source_channel.py +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/python/tensorfs/_tensors.py +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/python/tensorfs/derived.py +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/python/tensorfs/errors.py +0 -0
- {tensorfs-0.3.86 → tensorfs-0.3.88}/python/tensorfs/py.typed +0 -0
|
@@ -449,7 +449,7 @@ checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
|
|
|
449
449
|
|
|
450
450
|
[[package]]
|
|
451
451
|
name = "tensorfs-core"
|
|
452
|
-
version = "0.3.
|
|
452
|
+
version = "0.3.88"
|
|
453
453
|
dependencies = [
|
|
454
454
|
"fs2",
|
|
455
455
|
"libc",
|
|
@@ -464,7 +464,7 @@ dependencies = [
|
|
|
464
464
|
|
|
465
465
|
[[package]]
|
|
466
466
|
name = "tensorfs-plane"
|
|
467
|
-
version = "0.3.
|
|
467
|
+
version = "0.3.88"
|
|
468
468
|
dependencies = [
|
|
469
469
|
"libc",
|
|
470
470
|
"libloading",
|
|
@@ -474,7 +474,7 @@ dependencies = [
|
|
|
474
474
|
|
|
475
475
|
[[package]]
|
|
476
476
|
name = "tensorfs-py"
|
|
477
|
-
version = "0.3.
|
|
477
|
+
version = "0.3.88"
|
|
478
478
|
dependencies = [
|
|
479
479
|
"pyo3",
|
|
480
480
|
"tensorfs-core",
|
|
@@ -847,7 +847,7 @@ pub fn materialize_selected_with_options(
|
|
|
847
847
|
ledger = ledger.with_cancellation(cancellation.clone());
|
|
848
848
|
}
|
|
849
849
|
// Every member's liveness is published before any of their bytes move.
|
|
850
|
-
let mut jobs: Vec<crate::transport::
|
|
850
|
+
let mut jobs: Vec<crate::transport::sources::SourceJob> = vec![];
|
|
851
851
|
let (mut seen, mut held_bytes) = (std::collections::BTreeSet::new(), 0);
|
|
852
852
|
for member in &resolution.members {
|
|
853
853
|
writer.hold_expected(&member.object)?;
|
|
@@ -859,12 +859,12 @@ pub fn materialize_selected_with_options(
|
|
|
859
859
|
held_bytes += object.length;
|
|
860
860
|
continue;
|
|
861
861
|
}
|
|
862
|
-
jobs.push(crate::transport::
|
|
862
|
+
jobs.push(crate::transport::sources::SourceJob {
|
|
863
863
|
grant: DeliveryGrant::mint(&plan, object)?,
|
|
864
864
|
url: member.url.clone(),
|
|
865
865
|
});
|
|
866
866
|
}
|
|
867
|
-
let transferred = crate::transport::
|
|
867
|
+
let transferred = crate::transport::sources::fetch_sources(
|
|
868
868
|
store,
|
|
869
869
|
owner,
|
|
870
870
|
&jobs,
|
|
@@ -893,7 +893,7 @@ pub fn materialize_selected_with_options(
|
|
|
893
893
|
});
|
|
894
894
|
}
|
|
895
895
|
plan.complete(store)?;
|
|
896
|
-
crate::transport::
|
|
896
|
+
crate::transport::sources::discard_owner(store, owner)?;
|
|
897
897
|
let result = writer.finish(&tree)?;
|
|
898
898
|
Ok((result, pulled))
|
|
899
899
|
}
|
|
@@ -425,7 +425,7 @@ pub fn release(store: &Store, owner: &str) -> Result<()> {
|
|
|
425
425
|
Err(e) if e.kind() != std::io::ErrorKind::NotFound => return Err(io(e)),
|
|
426
426
|
_ => {}
|
|
427
427
|
}
|
|
428
|
-
crate::transport::
|
|
428
|
+
crate::transport::sources::discard_owner(store, owner)
|
|
429
429
|
}
|
|
430
430
|
|
|
431
431
|
/// Mark a retained tree delivered: its bytes may now be evicted under disk pressure, oldest
|
|
@@ -546,7 +546,9 @@ pub fn adopt_partial(store: &Store, source: &str, owner: &str) -> Result<TreeRoo
|
|
|
546
546
|
recipient.landed(&object)?;
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
|
-
crate::transport::
|
|
549
|
+
crate::transport::sources::adopt_owner(store, source, owner, |object| {
|
|
550
|
+
recipient.landed(object)
|
|
551
|
+
})?;
|
|
550
552
|
Ok(recipient.root.clone())
|
|
551
553
|
}
|
|
552
554
|
|
|
@@ -695,5 +697,5 @@ pub fn release_retention(
|
|
|
695
697
|
root.released = true;
|
|
696
698
|
root.objects.clear();
|
|
697
699
|
write(store, &root)?;
|
|
698
|
-
crate::transport::
|
|
700
|
+
crate::transport::sources::discard_owner(store, owner)
|
|
699
701
|
}
|
|
@@ -785,7 +785,7 @@ impl Store {
|
|
|
785
785
|
/// admission fits must see them.
|
|
786
786
|
pub fn occupancy(&self) -> Result<u64> {
|
|
787
787
|
let mut total: u64 = crate::staging::bytes(self)?
|
|
788
|
-
.checked_add(crate::transport::
|
|
788
|
+
.checked_add(crate::transport::sources::bytes(self)?)
|
|
789
789
|
.ok_or_else(|| Refusal {
|
|
790
790
|
code: Code::ARITH_OVERFLOW,
|
|
791
791
|
detail: "prefix occupancy overflow".into(),
|
|
@@ -12,9 +12,10 @@
|
|
|
12
12
|
//! 2322, sasori, dietfried, chieri: a pull's last objects at 30-180 KB/s for minutes).
|
|
13
13
|
//! Separate requests pay them side by side, and a late one is simply asked again.
|
|
14
14
|
//!
|
|
15
|
-
//! `fetch_ranged` is the same downloader for one object from a URL the caller holds
|
|
16
|
-
//!
|
|
17
|
-
//! first chunk goes alone: a 206 queues the
|
|
15
|
+
//! `fetch_ranged` is the same downloader for one object from a URL the caller holds, and
|
|
16
|
+
//! `sources` for a selected source's members, kept on disk across processes. Such an
|
|
17
|
+
//! origin may not answer ranges, so an object's first chunk goes alone: a 206 queues the
|
|
18
|
+
//! rest, a 200 is the whole object. Where it redirects to is asked for the rest directly.
|
|
18
19
|
|
|
19
20
|
use super::decisions;
|
|
20
21
|
use super::ledger::{Attempt, Deadline, Ledger, STALL_FACTOR};
|
|
@@ -22,6 +23,7 @@ use super::pull::{
|
|
|
22
23
|
open_object, shared_client, FetchObserver, Fetched, ObjectObserver, ObjectSource, ObjectUrls,
|
|
23
24
|
Opened, WalkOutcome,
|
|
24
25
|
};
|
|
26
|
+
use super::sources::{missing, Keep, Part};
|
|
25
27
|
use super::STREAMS;
|
|
26
28
|
use super::{CredentialProvider, SourcePolicy};
|
|
27
29
|
use crate::err::{refuse, Code, Refusal, Result};
|
|
@@ -30,7 +32,7 @@ use crate::ids::ObjectRef;
|
|
|
30
32
|
use crate::repo_cache::{BackfillBatch, CacheKind, CacheRead, CacheTrust};
|
|
31
33
|
use crate::store::{Fault, Store, Verified, PUT_TEMP};
|
|
32
34
|
use fs2::FileExt;
|
|
33
|
-
use std::collections::{BTreeMap, VecDeque};
|
|
35
|
+
use std::collections::{BTreeMap, HashMap, VecDeque};
|
|
34
36
|
use std::fs::{File, OpenOptions};
|
|
35
37
|
use std::io::Read;
|
|
36
38
|
use std::os::unix::fs::{FileExt as _, OpenOptionsExt};
|
|
@@ -57,23 +59,33 @@ const PIECE_BYTES: u64 = 1 << 20;
|
|
|
57
59
|
/// first byte, and how fast its body then came.
|
|
58
60
|
const PEERS: usize = 64;
|
|
59
61
|
|
|
60
|
-
/// An object being downloaded: its
|
|
62
|
+
/// An object being downloaded: its file, and what is still out.
|
|
61
63
|
struct Object {
|
|
62
|
-
/// Its place in `
|
|
64
|
+
/// Its place in `wanted`, which is how the URL supply names it.
|
|
63
65
|
at: usize,
|
|
64
66
|
grant: DeliveryGrant,
|
|
65
67
|
cache: Option<(CacheKind, CacheTrust)>,
|
|
66
68
|
path: PathBuf,
|
|
67
69
|
file: File,
|
|
68
|
-
///
|
|
70
|
+
/// A source download's kept file and record, in place of a temp file.
|
|
71
|
+
part: Option<Part>,
|
|
72
|
+
/// Pieces not yet home.
|
|
69
73
|
left: AtomicUsize,
|
|
74
|
+
/// Chunks not yet asked for: an origin that may not range has not yet answered one.
|
|
75
|
+
rest: Mutex<Vec<(u64, u64)>>,
|
|
76
|
+
/// Each chunk not yet home, by its first byte: its end and the pieces still out.
|
|
77
|
+
units: Mutex<HashMap<u64, (u64, usize)>>,
|
|
78
|
+
/// Where the origin last redirected this object's URL, asked directly until refused.
|
|
79
|
+
delivery: Mutex<Option<String>>,
|
|
70
80
|
/// Bytes requests wrote for it, bytes asked twice included.
|
|
71
81
|
moved: AtomicU64,
|
|
72
82
|
}
|
|
73
83
|
|
|
74
84
|
impl Drop for Object {
|
|
75
85
|
fn drop(&mut self) {
|
|
76
|
-
|
|
86
|
+
if self.part.is_none() {
|
|
87
|
+
let _ = std::fs::remove_file(&self.path);
|
|
88
|
+
}
|
|
77
89
|
}
|
|
78
90
|
}
|
|
79
91
|
|
|
@@ -95,6 +107,8 @@ struct Chunk {
|
|
|
95
107
|
fresh: bool,
|
|
96
108
|
/// The object's only chunk so far: its origin has not yet shown that it answers ranges.
|
|
97
109
|
lead: bool,
|
|
110
|
+
/// The chunk this is (a piece of): the range a source download records when it is home.
|
|
111
|
+
unit: (u64, u64),
|
|
98
112
|
}
|
|
99
113
|
|
|
100
114
|
impl Chunk {
|
|
@@ -182,6 +196,8 @@ pub(super) struct Download<'a> {
|
|
|
182
196
|
pub ledger: &'a Ledger,
|
|
183
197
|
pub on_object: Option<ObjectObserver<'a>>,
|
|
184
198
|
pub backfill: Option<&'a BackfillBatch<'a>>,
|
|
199
|
+
/// A source download: objects kept on disk under their owner, resumable.
|
|
200
|
+
pub keep: Option<&'a Keep<'a>>,
|
|
185
201
|
}
|
|
186
202
|
|
|
187
203
|
struct Run<'a> {
|
|
@@ -391,7 +407,8 @@ impl Run<'_> {
|
|
|
391
407
|
Destination::Staging => None,
|
|
392
408
|
};
|
|
393
409
|
let mut cache = None;
|
|
394
|
-
|
|
410
|
+
let mounted = job.store.repo_cache().filter(|_| job.keep.is_none());
|
|
411
|
+
if let (Some(kind), Some(mounted)) = (kind, mounted) {
|
|
395
412
|
let mut trust = CacheTrust::Name;
|
|
396
413
|
match mounted.admit(job.store, kind, wanted)? {
|
|
397
414
|
CacheRead::Hit => {
|
|
@@ -413,7 +430,72 @@ impl Run<'_> {
|
|
|
413
430
|
cache = Some((kind, trust));
|
|
414
431
|
}
|
|
415
432
|
let length = wanted.length;
|
|
416
|
-
let path = job.
|
|
433
|
+
let (path, file, part, chunks) = match job.keep {
|
|
434
|
+
Some(keep) => {
|
|
435
|
+
let part = Part::open(job.store, keep.owner, wanted, true)?;
|
|
436
|
+
let done = part.done();
|
|
437
|
+
keep.landed(part.covered() as i64);
|
|
438
|
+
let file = part.file.try_clone().map_err(|error| Refusal {
|
|
439
|
+
code: Code::IO_FAILED,
|
|
440
|
+
detail: format!("source download: {error}"),
|
|
441
|
+
})?;
|
|
442
|
+
(part.bytes(), file, Some(part), missing(&done, length))
|
|
443
|
+
}
|
|
444
|
+
None => {
|
|
445
|
+
let (path, file) = self.temp(length)?;
|
|
446
|
+
(path, file, None, vec![(0, length)])
|
|
447
|
+
}
|
|
448
|
+
};
|
|
449
|
+
let chunks: Vec<(u64, u64)> = chunks
|
|
450
|
+
.into_iter()
|
|
451
|
+
.flat_map(|(first, end)| {
|
|
452
|
+
(first..end)
|
|
453
|
+
.step_by(job.chunk as usize)
|
|
454
|
+
.map(move |at| (at, (at + job.chunk).min(end)))
|
|
455
|
+
})
|
|
456
|
+
.collect();
|
|
457
|
+
// An origin that may not range is asked for the first chunk alone.
|
|
458
|
+
let asked = if job.ranged { chunks.len() } else { 1 };
|
|
459
|
+
let object = Arc::new(Object {
|
|
460
|
+
at,
|
|
461
|
+
grant,
|
|
462
|
+
cache,
|
|
463
|
+
path,
|
|
464
|
+
file,
|
|
465
|
+
part,
|
|
466
|
+
left: AtomicUsize::new(chunks.len()),
|
|
467
|
+
rest: Mutex::new(chunks.iter().skip(asked).rev().copied().collect()),
|
|
468
|
+
units: Mutex::new(
|
|
469
|
+
chunks
|
|
470
|
+
.iter()
|
|
471
|
+
.map(|(first, end)| (*first, (*end, 1)))
|
|
472
|
+
.collect(),
|
|
473
|
+
),
|
|
474
|
+
delivery: Mutex::new(None),
|
|
475
|
+
moved: AtomicU64::new(0),
|
|
476
|
+
});
|
|
477
|
+
let chunk = |(first, end)| Chunk {
|
|
478
|
+
object: Arc::clone(&object),
|
|
479
|
+
first,
|
|
480
|
+
end,
|
|
481
|
+
due: Instant::now(),
|
|
482
|
+
stated: false,
|
|
483
|
+
stale: None,
|
|
484
|
+
silent: 0,
|
|
485
|
+
fresh: true,
|
|
486
|
+
lead: !job.ranged,
|
|
487
|
+
unit: (first, end),
|
|
488
|
+
};
|
|
489
|
+
if chunks.is_empty() {
|
|
490
|
+
return Ok(vec![chunk((length, length))]);
|
|
491
|
+
}
|
|
492
|
+
Ok(chunks.into_iter().take(asked).map(chunk).collect())
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
/// A locked temp file of `length` bytes, under the Store's own temp name so its reaper
|
|
496
|
+
/// knows a live writer from an orphan.
|
|
497
|
+
fn temp(&self, length: u64) -> Result<(PathBuf, File)> {
|
|
498
|
+
let path = self.job.store.root().join("tmp").join(format!(
|
|
417
499
|
"{PUT_TEMP}chunks-{}-{}",
|
|
418
500
|
std::process::id(),
|
|
419
501
|
crate::meta::now_nanos_unique()
|
|
@@ -432,7 +514,6 @@ impl Run<'_> {
|
|
|
432
514
|
.mode(0o600)
|
|
433
515
|
.open(&path)
|
|
434
516
|
.map_err(|error| io("create", error))?;
|
|
435
|
-
// The Store's own temp name and lock, so its reaper knows a live writer from an orphan.
|
|
436
517
|
let sized = file
|
|
437
518
|
.try_lock_exclusive()
|
|
438
519
|
.and_then(|()| file.set_len(length));
|
|
@@ -440,59 +521,53 @@ impl Run<'_> {
|
|
|
440
521
|
let _ = std::fs::remove_file(&path);
|
|
441
522
|
return Err(io("size", error));
|
|
442
523
|
}
|
|
443
|
-
|
|
444
|
-
let object = Arc::new(Object {
|
|
445
|
-
at,
|
|
446
|
-
grant,
|
|
447
|
-
cache,
|
|
448
|
-
path,
|
|
449
|
-
file,
|
|
450
|
-
left: AtomicUsize::new(firsts.len()),
|
|
451
|
-
moved: AtomicU64::new(0),
|
|
452
|
-
});
|
|
453
|
-
let chunk = |first, end| Chunk {
|
|
454
|
-
object: Arc::clone(&object),
|
|
455
|
-
first,
|
|
456
|
-
end,
|
|
457
|
-
due: Instant::now(),
|
|
458
|
-
stated: false,
|
|
459
|
-
stale: None,
|
|
460
|
-
silent: 0,
|
|
461
|
-
fresh: true,
|
|
462
|
-
lead: !job.ranged,
|
|
463
|
-
};
|
|
464
|
-
if firsts.is_empty() {
|
|
465
|
-
return Ok(vec![chunk(0, 0)]);
|
|
466
|
-
}
|
|
467
|
-
// An origin that may not range is asked for the first chunk alone.
|
|
468
|
-
let asked = if job.ranged { firsts.len() } else { 1 };
|
|
469
|
-
Ok(firsts
|
|
470
|
-
.into_iter()
|
|
471
|
-
.take(asked)
|
|
472
|
-
.map(|first| chunk(first, (first + job.chunk).min(length)))
|
|
473
|
-
.collect())
|
|
524
|
+
Ok((path, file))
|
|
474
525
|
}
|
|
475
526
|
|
|
476
527
|
/// The origin answered a range: the object's other chunks join the queue.
|
|
477
528
|
fn rest(&self, lead: &Chunk) {
|
|
478
|
-
let
|
|
529
|
+
let rest = std::mem::take(&mut *lead.object.rest.lock().unwrap());
|
|
479
530
|
let mut state = self.state.lock().unwrap();
|
|
480
|
-
for first in (
|
|
531
|
+
for (first, end) in rest.into_iter().rev() {
|
|
481
532
|
state.queue.push_back(Chunk {
|
|
482
533
|
object: Arc::clone(&lead.object),
|
|
483
534
|
first,
|
|
484
|
-
end
|
|
535
|
+
end,
|
|
485
536
|
due: Instant::now(),
|
|
486
537
|
stated: false,
|
|
487
538
|
stale: None,
|
|
488
539
|
silent: 0,
|
|
489
540
|
fresh: true,
|
|
490
541
|
lead: false,
|
|
542
|
+
unit: (first, end),
|
|
491
543
|
});
|
|
492
544
|
}
|
|
493
545
|
self.wake.notify_all();
|
|
494
546
|
}
|
|
495
547
|
|
|
548
|
+
/// A piece is home. When it was its chunk's last, a source download records the chunk.
|
|
549
|
+
fn unit_home(&self, chunk: &Chunk) -> Result<()> {
|
|
550
|
+
let object = &chunk.object;
|
|
551
|
+
let mut units = object.units.lock().unwrap();
|
|
552
|
+
let Some((end, out)) = units.get_mut(&chunk.unit.0) else {
|
|
553
|
+
return Ok(());
|
|
554
|
+
};
|
|
555
|
+
*out -= 1;
|
|
556
|
+
if *out > 0 {
|
|
557
|
+
return Ok(());
|
|
558
|
+
}
|
|
559
|
+
let end = *end;
|
|
560
|
+
units.remove(&chunk.unit.0);
|
|
561
|
+
drop(units);
|
|
562
|
+
let (Some(part), Some(keep)) = (&object.part, self.job.keep) else {
|
|
563
|
+
return Ok(());
|
|
564
|
+
};
|
|
565
|
+
let before = part.covered();
|
|
566
|
+
part.record(chunk.unit.0, end, keep.fault)?;
|
|
567
|
+
keep.landed((part.covered() - before) as i64);
|
|
568
|
+
Ok(())
|
|
569
|
+
}
|
|
570
|
+
|
|
496
571
|
/// One GET for a chunk, written at its offsets. Whatever ends it early, the bytes that
|
|
497
572
|
/// landed stay and the rest goes back on the queue.
|
|
498
573
|
fn request(&self, slot: usize, mut chunk: Chunk, buffer: &mut [u8]) -> Outcome {
|
|
@@ -503,9 +578,13 @@ impl Run<'_> {
|
|
|
503
578
|
let stale = chunk.stale.take();
|
|
504
579
|
let asked = self.began.elapsed();
|
|
505
580
|
self.minting[slot].store(asked.as_millis() as u64 + 1, Ordering::Release);
|
|
506
|
-
let
|
|
507
|
-
|
|
508
|
-
|
|
581
|
+
let delivery = object.delivery.lock().unwrap().clone();
|
|
582
|
+
let url = match delivery.clone() {
|
|
583
|
+
Some(delivery) => Ok(delivery),
|
|
584
|
+
None => job
|
|
585
|
+
.urls
|
|
586
|
+
.url_for_while(object.at, wanted, stale.is_some(), job.ledger),
|
|
587
|
+
};
|
|
509
588
|
self.minting[slot].store(0, Ordering::Release);
|
|
510
589
|
if self.began.elapsed() - asked >= job.ledger.sample() {
|
|
511
590
|
let now = self.began.elapsed().as_millis() as u64;
|
|
@@ -541,7 +620,7 @@ impl Run<'_> {
|
|
|
541
620
|
seen: 0,
|
|
542
621
|
});
|
|
543
622
|
self.requests.fetch_add(1, Ordering::Relaxed);
|
|
544
|
-
let ended = self.stream(&mut chunk, &url, &ledger, buffer);
|
|
623
|
+
let ended = self.stream(&mut chunk, &url, delivery.is_some(), &ledger, buffer);
|
|
545
624
|
*self.flights[slot].lock().unwrap() = None;
|
|
546
625
|
// What this ask added: a whole answer to a resumed range starts the object over.
|
|
547
626
|
let moved = chunk.first.saturating_sub(asked.0);
|
|
@@ -558,6 +637,9 @@ impl Run<'_> {
|
|
|
558
637
|
remember(&mut state.small, wait + body);
|
|
559
638
|
}
|
|
560
639
|
}
|
|
640
|
+
if let Err(refusal) = self.unit_home(&chunk) {
|
|
641
|
+
return Outcome::Fatal(named(refusal, &wanted.id()));
|
|
642
|
+
}
|
|
561
643
|
if object.left.fetch_sub(1, Ordering::AcqRel) > 1 {
|
|
562
644
|
return Outcome::Home;
|
|
563
645
|
}
|
|
@@ -602,6 +684,9 @@ impl Run<'_> {
|
|
|
602
684
|
while dropped && !chunk.lead && chunk.end - chunk.first > piece {
|
|
603
685
|
let end = chunk.first + piece;
|
|
604
686
|
object.left.fetch_add(1, Ordering::AcqRel);
|
|
687
|
+
if let Some((_, out)) = object.units.lock().unwrap().get_mut(&chunk.unit.0) {
|
|
688
|
+
*out += 1;
|
|
689
|
+
}
|
|
605
690
|
again.push(Chunk {
|
|
606
691
|
object: Arc::clone(&object),
|
|
607
692
|
end,
|
|
@@ -623,6 +708,7 @@ impl Run<'_> {
|
|
|
623
708
|
&self,
|
|
624
709
|
chunk: &mut Chunk,
|
|
625
710
|
url: &str,
|
|
711
|
+
delivered: bool,
|
|
626
712
|
ledger: &Ledger,
|
|
627
713
|
buffer: &mut [u8],
|
|
628
714
|
) -> std::result::Result<(), Ended> {
|
|
@@ -635,7 +721,8 @@ impl Run<'_> {
|
|
|
635
721
|
"range".to_string(),
|
|
636
722
|
format!("bytes={}-{}", chunk.first, chunk.end - 1),
|
|
637
723
|
)];
|
|
638
|
-
let
|
|
724
|
+
let mut hops = Vec::new();
|
|
725
|
+
let opened = open_object(
|
|
639
726
|
shared_client(),
|
|
640
727
|
url,
|
|
641
728
|
job.policy,
|
|
@@ -643,9 +730,24 @@ impl Run<'_> {
|
|
|
643
730
|
job.deadline,
|
|
644
731
|
ledger,
|
|
645
732
|
if whole { &[] } else { &range },
|
|
646
|
-
&mut |
|
|
647
|
-
)
|
|
648
|
-
|
|
733
|
+
&mut |checked, _| hops.push(checked.url()),
|
|
734
|
+
)?;
|
|
735
|
+
// A redirect target that refuses is forgotten, and the object's URL asked again.
|
|
736
|
+
if delivered && !matches!(opened, Opened::Body(_) | Opened::Retryable(..)) {
|
|
737
|
+
*object.delivery.lock().unwrap() = None;
|
|
738
|
+
let answered = Refusal {
|
|
739
|
+
code: Code::TRANSFER_FAILED,
|
|
740
|
+
detail: "the origin's redirect target refused this ask".into(),
|
|
741
|
+
};
|
|
742
|
+
return Err(Ended::Retry(answered, Some(Duration::ZERO)));
|
|
743
|
+
}
|
|
744
|
+
let response = match opened {
|
|
745
|
+
Opened::Body(response) => {
|
|
746
|
+
if hops.len() > 1 {
|
|
747
|
+
*object.delivery.lock().unwrap() = hops.pop();
|
|
748
|
+
}
|
|
749
|
+
response
|
|
750
|
+
}
|
|
649
751
|
Opened::Retryable(status, stated) => {
|
|
650
752
|
let answered = Refusal {
|
|
651
753
|
code: Code::TRANSFER_FAILED,
|
|
@@ -695,12 +797,17 @@ impl Run<'_> {
|
|
|
695
797
|
// A range answered with the whole object: take it from its first byte. An origin
|
|
696
798
|
// that does not range gives the object to this one request.
|
|
697
799
|
(200, _) if chunk.lead || wanted.length <= job.chunk => {
|
|
698
|
-
|
|
699
|
-
|
|
800
|
+
// What this chunk's earlier asks moved is moved again.
|
|
801
|
+
let again = chunk.first - chunk.unit.0;
|
|
802
|
+
job.store.discarded(again);
|
|
803
|
+
self.landed.fetch_sub(again, Ordering::Relaxed);
|
|
700
804
|
chunk.first = 0;
|
|
701
805
|
if chunk.lead {
|
|
702
806
|
chunk.end = wanted.length;
|
|
807
|
+
chunk.unit = (0, wanted.length);
|
|
703
808
|
object.left.store(1, Ordering::Release);
|
|
809
|
+
object.rest.lock().unwrap().clear();
|
|
810
|
+
*object.units.lock().unwrap() = HashMap::from([(0, (wanted.length, 1))]);
|
|
704
811
|
}
|
|
705
812
|
}
|
|
706
813
|
(status, ranged) => {
|
|
@@ -751,6 +858,10 @@ impl Run<'_> {
|
|
|
751
858
|
let job = self.job;
|
|
752
859
|
let wanted = &object.grant.object;
|
|
753
860
|
let moved = object.moved.load(Ordering::Relaxed);
|
|
861
|
+
let fault = job
|
|
862
|
+
.keep
|
|
863
|
+
.map_or(&Fault::default(), |keep| keep.fault)
|
|
864
|
+
.clone();
|
|
754
865
|
let admitted = (|| {
|
|
755
866
|
if job.store.flushes() {
|
|
756
867
|
object.file.sync_all().map_err(|error| Refusal {
|
|
@@ -781,15 +892,28 @@ impl Run<'_> {
|
|
|
781
892
|
if object.grant.destination == Destination::Staging {
|
|
782
893
|
return crate::staging::adopt(job.store, verified).map(|_| ());
|
|
783
894
|
}
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
.map(|_| ())
|
|
895
|
+
fault.hit("verified");
|
|
896
|
+
job.store.admit_verified(verified, &fault, None).map(|_| ())
|
|
787
897
|
})();
|
|
788
|
-
// Wrong bytes are the door's verdict on the origin: nothing is asked again
|
|
898
|
+
// Wrong bytes are the door's verdict on the origin: nothing is asked again, and a
|
|
899
|
+
// kept download starts over the next time it is asked for.
|
|
789
900
|
if let Err(refusal) = admitted {
|
|
790
901
|
job.store.discarded(moved);
|
|
902
|
+
if let (Some(part), Some(keep), Code::OBJECT_ID_MISMATCH) =
|
|
903
|
+
(&object.part, job.keep, refusal.code)
|
|
904
|
+
{
|
|
905
|
+
keep.landed(-(part.covered() as i64));
|
|
906
|
+
if let Err(reset) = part.reset() {
|
|
907
|
+
return Outcome::Fatal(named(reset, &wanted.id()));
|
|
908
|
+
}
|
|
909
|
+
}
|
|
791
910
|
return Outcome::Fatal(named(refusal, &wanted.id()));
|
|
792
911
|
}
|
|
912
|
+
if let (Some(part), Some(keep)) = (&object.part, job.keep) {
|
|
913
|
+
fault.hit("admitted");
|
|
914
|
+
part.finished();
|
|
915
|
+
keep.landed((wanted.length - part.covered()) as i64);
|
|
916
|
+
}
|
|
793
917
|
job.ledger.answered();
|
|
794
918
|
self.fetched.fetch_add(1, Ordering::Relaxed);
|
|
795
919
|
self.bytes_moved.fetch_add(moved, Ordering::Relaxed);
|
|
@@ -1056,6 +1180,7 @@ pub fn fetch_ranged(
|
|
|
1056
1180
|
ledger,
|
|
1057
1181
|
on_object: None,
|
|
1058
1182
|
backfill: None,
|
|
1183
|
+
keep: None,
|
|
1059
1184
|
}
|
|
1060
1185
|
.run(ranged.streams.clamp(1, 64), observer)?;
|
|
1061
1186
|
Ok(Fetched {
|
|
@@ -526,7 +526,7 @@ impl CredentialProvider for CloseRequests {
|
|
|
526
526
|
}
|
|
527
527
|
|
|
528
528
|
#[test]
|
|
529
|
-
fn
|
|
529
|
+
fn source_chunks_ask_the_redirect_target_on_one_connection() {
|
|
530
530
|
use crate::{
|
|
531
531
|
ids::ObjectRef,
|
|
532
532
|
providers::{self, Provenance, Resolution, ResolvedMember},
|
|
@@ -608,15 +608,15 @@ fn retained_source_redirect_ranges_reduce_connections_without_changing_asks_or_b
|
|
|
608
608
|
let elapsed = start.elapsed();
|
|
609
609
|
assert_eq!(rows[0].transferred, bytes.len() as u64);
|
|
610
610
|
assert!(store.record_valid(&object.sha256).is_ok());
|
|
611
|
-
// One ask walks the redirect
|
|
612
|
-
//
|
|
613
|
-
assert_eq!(origin.asks.lock().unwrap().len(),
|
|
614
|
-
assert_eq!(origin.count(), if close {
|
|
611
|
+
// One ask walks the redirect and the eight 1 MiB chunks ask its target directly,
|
|
612
|
+
// all on the drained redirect's socket unless each ask closes its own.
|
|
613
|
+
assert_eq!(origin.asks.lock().unwrap().len(), 9);
|
|
614
|
+
assert_eq!(origin.count(), if close { 9 } else { 1 });
|
|
615
615
|
timings.push((close, elapsed.as_secs_f64(), origin.count()));
|
|
616
616
|
drop(store);
|
|
617
617
|
std::fs::remove_dir_all(root).unwrap();
|
|
618
618
|
}
|
|
619
|
-
println!("
|
|
619
|
+
println!("source 8 MiB, one redirect, eight 1 MiB chunks, 30 ms connection setup: {timings:?}");
|
|
620
620
|
}
|
|
621
621
|
|
|
622
622
|
#[test]
|
|
@@ -39,9 +39,9 @@ mod hub;
|
|
|
39
39
|
mod ledger;
|
|
40
40
|
mod memory;
|
|
41
41
|
mod policy;
|
|
42
|
-
pub(crate) mod prefix;
|
|
43
42
|
mod pull;
|
|
44
43
|
mod push;
|
|
44
|
+
pub(crate) mod sources;
|
|
45
45
|
|
|
46
46
|
#[cfg(test)]
|
|
47
47
|
mod tests;
|
|
@@ -65,4 +65,4 @@ pub use pull::{
|
|
|
65
65
|
};
|
|
66
66
|
pub use push::{push_object, Pushed, UploadGrant, MAX_GRANT_BYTES, PUT_ATTEMPTS};
|
|
67
67
|
|
|
68
|
-
pub use
|
|
68
|
+
pub use sources::{SourceDownload, SourceProgress};
|