Indexes: share_targets.target_id, duplicate_groups.status, GIN on stacks members + duplicate candidates JSONB, composite (owner_user_id, created_at DESC) on assets. N+1 elimination: batch metadata loading via find_by_assets(ids) using WHERE asset_id = ANY($1), used in timeline + sidecar export. Visibility: cache find_targets_for_user per request via OnceCell, extract filter_visible helper to reduce duplication. Streaming: FileStoragePort.open_file() returns (DataStream, u64), LocalFileStorage uses ReaderStream instead of loading full file. serve_file/serve_derivative use Body::from_stream(). Unbounded queries: sidecar full_export/import batched in 500-row chunks instead of u32::MAX. find_unresolved paginated with limit/offset. list_duplicates API accepts pagination params.
24 lines
550 B
TOML
24 lines
550 B
TOML
[package]
|
|
name = "adapters-storage"
|
|
version = "0.1.0"
|
|
edition = "2024"
|
|
|
|
[features]
|
|
default = []
|
|
s3 = ["object_store/aws"]
|
|
gcs = ["object_store/gcp"]
|
|
|
|
[dependencies]
|
|
domain = { workspace = true }
|
|
async-trait = { workspace = true }
|
|
anyhow = { workspace = true }
|
|
tracing = { workspace = true }
|
|
bytes = { workspace = true }
|
|
futures = { workspace = true }
|
|
tokio = { workspace = true, features = ["fs"] }
|
|
tokio-util = { workspace = true }
|
|
object_store = { version = "0.11" }
|
|
|
|
[dev-dependencies]
|
|
tokio = { workspace = true }
|