Expand description
Multipart upload bookkeeping via redb.
§Architecture
MultipartTable wraps a shared redb Database handle and provides typed
CRUD operations over the multipart_active table. The same DB file used by
CacheStore is reused so there is only one redb file handle per process.
§Table schema
- Table name:
"multipart_active" - Key :
"<profile_id>\x00<bucket>\x00<key>"— composite string key. - Value:
serde_json::to_vec(MultipartRecord).
§Key design (OCP note)
The composite key is (profile, bucket, object_key) rather than
upload_id. Concurrent uploads to the same (profile, bucket, key) are
rare; the second upload overwrites the first record, keeping the table in
sync with the active upload. find_by_upload_id does a linear scan and is
used only by the cleanup scanner (task 38).
Structs§
- Multipart
Record - Persisted record for one in-flight multipart upload.
- Multipart
Table - Typed wrapper around the
multipart_activeredb table. - Multipart
Table Handle - Tauri managed state handle for
MultipartTable. - Multipart
Upload - Describes one in-progress multipart upload as returned by the cleanup scanner.
Enums§
- Multipart
Source - Discriminates the origin of an in-progress multipart upload.
Constants§
- MULTIPART_
TABLE 🔒 - redb table for in-flight multipart uploads.
Functions§
- abort_
multipart_ upload - Abort a single in-progress multipart upload.
- scan_
multipart_ uploads - List all in-progress multipart uploads for
bucket, classify each asBrows3rorUnknown, and optionally filter out uploads younger thanolder_than_secs.