aboutsummaryrefslogtreecommitdiff
path: root/src/model/s3/mpu_table.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-06-13 10:48:22 +0200
committerAlex Auvolat <alex@adnab.me>2023-06-13 10:48:22 +0200
commit942c1f1bfe138cbc4e49540cede852e4d462590e (patch)
tree1c95238bb519e7f20cd7f749adf864544993e507 /src/model/s3/mpu_table.rs
parent0a06fda0da35f4018c39bf6aec90e55bdf42d241 (diff)
downloadgarage-942c1f1bfe138cbc4e49540cede852e4d462590e.tar.gz
garage-942c1f1bfe138cbc4e49540cede852e4d462590e.zip
multipart uploads: save timestamp
Diffstat (limited to 'src/model/s3/mpu_table.rs')
-rw-r--r--src/model/s3/mpu_table.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/model/s3/mpu_table.rs b/src/model/s3/mpu_table.rs
index 63a4f1af..238cbf11 100644
--- a/src/model/s3/mpu_table.rs
+++ b/src/model/s3/mpu_table.rs
@@ -27,6 +27,8 @@ mod v09 {
/// Partition key = Upload id = UUID of the object version
pub upload_id: Uuid,
+ /// The timestamp at which the multipart upload was created
+ pub timestamp: u64,
/// Is this multipart upload deleted
/// The MultipartUpload is marked as deleted as soon as the
/// multipart upload is either completed or aborted
@@ -85,9 +87,16 @@ impl PartialOrd for MpuPartKey {
}
impl MultipartUpload {
- pub fn new(upload_id: Uuid, bucket_id: Uuid, key: String, deleted: bool) -> Self {
+ pub fn new(
+ upload_id: Uuid,
+ timestamp: u64,
+ bucket_id: Uuid,
+ key: String,
+ deleted: bool,
+ ) -> Self {
Self {
upload_id,
+ timestamp,
deleted: crdt::Bool::new(deleted),
parts: crdt::Map::new(),
bucket_id,