Background
In a S3 blob store, when a temp blob is no longer needed, S3BlobStore.deleteHard is used to remove the temp blob using an S3 delete request.
The downside of S3 hard delete operations are that they noticeably slower in real time that what is known as a soft-delete. A soft delete is quicker in comparison and marks the temp blob for later deletion by the S3 AWS lifecycle policy.
The downside of soft-deletes for temp blobs is that temp blobs will fill the S3 bucket until they are removed by a lifecycle policy. Some customers have configured S3 blob stores to have NO policy, or a policy for long Expiry - which could lead to an S3 bucket getting full much quicker when using soft deletes, increasing storage costs.
Expected
Make it configurable to change the current hard delete behaviour to soft-deletes for S3 blobstore temp blobs.
An administrator can enable this new soft-delete option by adding the following to nexus.properties file - if not set the default remains false ( hard delete ):
nexus.S3.preferExpire=true