aboutsummaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-05-04 11:49:23 +0200
committerAlex Auvolat <alex@adnab.me>2023-06-09 16:23:37 +0200
commit511e07ecd489fa72040171fe908323873a57ac19 (patch)
treee4fe58d387f8cb3c913e4bfad8c1472151fc8d88 /src/model
parent4ea53dc75930d813b84b79c3427b194b6e664ce7 (diff)
downloadgarage-511e07ecd489fa72040171fe908323873a57ac19.tar.gz
garage-511e07ecd489fa72040171fe908323873a57ac19.zip
fix mpu counter (add missing workers) and report info at appropriate places
Diffstat (limited to 'src/model')
-rw-r--r--src/model/garage.rs2
-rw-r--r--src/model/helper/bucket.rs4
-rw-r--r--src/model/s3/mpu_table.rs2
3 files changed, 6 insertions, 2 deletions
diff --git a/src/model/garage.rs b/src/model/garage.rs
index 31da1715..db2475ed 100644
--- a/src/model/garage.rs
+++ b/src/model/garage.rs
@@ -335,6 +335,8 @@ impl Garage {
self.object_table.spawn_workers(bg);
self.object_counter_table.spawn_workers(bg);
+ self.mpu_table.spawn_workers(bg);
+ self.mpu_counter_table.spawn_workers(bg);
self.version_table.spawn_workers(bg);
self.block_ref_table.spawn_workers(bg);
diff --git a/src/model/helper/bucket.rs b/src/model/helper/bucket.rs
index ff711d29..576d03f3 100644
--- a/src/model/helper/bucket.rs
+++ b/src/model/helper/bucket.rs
@@ -478,7 +478,9 @@ impl<'a> BucketHelper<'a> {
// ----
/// Deletes all incomplete multipart uploads that are older than a certain time.
- /// Returns the number of uploads aborted
+ /// Returns the number of uploads aborted.
+ /// This will also include non-multipart uploads, which may be lingering
+ /// after a node crash
pub async fn cleanup_incomplete_uploads(
&self,
bucket_id: &Uuid,
diff --git a/src/model/s3/mpu_table.rs b/src/model/s3/mpu_table.rs
index 7148be51..4764e8da 100644
--- a/src/model/s3/mpu_table.rs
+++ b/src/model/s3/mpu_table.rs
@@ -208,7 +208,7 @@ impl TableSchema for MultipartUploadTable {
}
impl CountedItem for MultipartUpload {
- const COUNTER_TABLE_NAME: &'static str = "bucket_mpu_part_counter";
+ const COUNTER_TABLE_NAME: &'static str = "bucket_mpu_counter";
// Partition key = bucket id
type CP = Uuid;