Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
wcy-fdu committed Feb 15, 2024
1 parent c433f97 commit 62fb689
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions core/src/services/azblob/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,17 +166,10 @@ impl oio::BlockWrite for AzblobWriter {
}
}

async fn abort_block(&self, block_ids: Vec<Uuid>) -> Result<()> {
// Azure blob storage will gc uncommitted blocks after 7 days.
for block_id in block_ids {
let resp = self.core.azblob_delete_blob(&block_id.to_string()).await?;
match resp.status() {
StatusCode::OK => {
resp.into_body().consume().await?;
}
_ => return Err(parse_error(resp).await?),
}
}
async fn abort_block(&self, _block_ids: Vec<Uuid>) -> Result<()> {
// refer to https://learn.microsoft.com/en-us/rest/api/storageservices/put-block-list?tabs=microsoft-entra-id
// Any uncommitted blocks are garbage collected if there are no successful calls to Put Block or Put Block List on the blob within a week.
// If Put Blob is called on the blob, any uncommitted blocks are garbage collected.
Ok(())
}
}

0 comments on commit 62fb689

Please sign in to comment.