Avoid extra GetObjectInfo call in DeleteObject API (#17599)

Optimize DeleteObject API to avoid extra 
GetObjectInfo call on the replicating side.

For receiving side, it is just a regular
DeleteObject call.

Bonus: Fix a corner case where version purged is 
absent on target (either due to replication not yet
complete or target version already deleted in a
one-way replication or when replication was disabled). 

In such cases, mark version purge complete.
This commit is contained in:
Poorna
2023-07-10 10:57:56 -04:00
committed by GitHub
parent dfd7cca0d2
commit e8c98c3246
9 changed files with 124 additions and 81 deletions

View File

@@ -185,6 +185,7 @@ type ObjectInfo struct {
VersionPurgeStatusInternal string
VersionPurgeStatus VersionPurgeStatusType
replicationDecision string // internal representation of replication decision for use by DeleteObject handler
// The total count of all versions of this object
NumVersions int
// The modtime of the successor object version if any