aboutsummaryrefslogtreecommitdiff
path: root/src/core/object_table.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-04-26 20:39:32 +0000
committerAlex Auvolat <alex@adnab.me>2020-04-26 20:39:32 +0000
commit81ecc4999e16c58ce6d0e97501f7b6b1497f6cf6 (patch)
treed22638738b6105ebc8c7eb8fe1d633bf3627b034 /src/core/object_table.rs
parent1999c0ae5152917625558c588e71b27f63950f41 (diff)
downloadgarage-81ecc4999e16c58ce6d0e97501f7b6b1497f6cf6.tar.gz
garage-81ecc4999e16c58ce6d0e97501f7b6b1497f6cf6.zip
Implement multipart uploads
Diffstat (limited to 'src/core/object_table.rs')
-rw-r--r--src/core/object_table.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/object_table.rs b/src/core/object_table.rs
index 04f64fe7..01df70e6 100644
--- a/src/core/object_table.rs
+++ b/src/core/object_table.rs
@@ -88,6 +88,7 @@ impl ObjectVersionState {
#[derive(PartialEq, Clone, Debug, Serialize, Deserialize)]
pub enum ObjectVersionData {
+ Uploading,
DeleteMarker,
Inline(#[serde(with = "serde_bytes")] Vec<u8>),
FirstBlock(Hash),
@@ -125,6 +126,9 @@ impl Entry<String, String> for Object {
v.size = other_v.size;
}
v.state = v.state.max(other_v.state);
+ if v.data == ObjectVersionData::Uploading {
+ v.data = other_v.data.clone();
+ }
}
Err(i) => {
self.versions.insert(i, other_v.clone());