Skip to main content

Module multipart

Module multipart 

Source
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§

MultipartRecord
Persisted record for one in-flight multipart upload.
MultipartTable
Typed wrapper around the multipart_active redb table.
MultipartTableHandle
Tauri managed state handle for MultipartTable.
MultipartUpload
Describes one in-progress multipart upload as returned by the cleanup scanner.

Enums§

MultipartSource
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 as Brows3r or Unknown, and optionally filter out uploads younger than older_than_secs.