Skip to content

Commit

Permalink
Review fixes: make check consistent in all write functions
Browse files Browse the repository at this point in the history
  • Loading branch information
alesapin committed Oct 9, 2023
1 parent 08f4621 commit 89294c0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Disks/ObjectStorages/DiskObjectStorageTransaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,12 @@ void DiskObjectStorageTransaction::writeFileUsingBlobWritingFunction(

/// Create metadata (see create_metadata_callback in DiskObjectStorageTransaction::writeFile()).
if (mode == WriteMode::Rewrite)
{
if (!object_storage.isWriteOnce() && metadata_storage.exists(path))
object_storage.removeObjectsIfExist(metadata_storage.getStorageObjects(path));

metadata_transaction->createMetadataFile(path, blob_name, object_size);
}
else
metadata_transaction->addBlobToMetadata(path, blob_name, object_size);
}
Expand Down

0 comments on commit 89294c0

Please sign in to comment.