decrypt ETags in parallel around 500 at a time (#10261)

Listing speed-up gained from 10secs for
just 400 entries to 2secs for 400 entries
This commit is contained in:
Harshavardhana
2020-08-14 11:56:35 -07:00
committed by GitHub
parent 4e00b47b52
commit 1d1c4430b2
5 changed files with 45 additions and 43 deletions

View File

@@ -400,6 +400,15 @@ func (o ObjectInfo) IsCompressedOK() (bool, error) {
return true, fmt.Errorf("unknown compression scheme: %s", scheme)
}
// GetActualETag - returns the actual etag of the stored object
// decrypts SSE objects.
func (o ObjectInfo) GetActualETag(h http.Header) string {
if !crypto.IsEncrypted(o.UserDefined) {
return o.ETag
}
return getDecryptedETag(h, o, false)
}
// GetActualSize - returns the actual size of the stored object
func (o ObjectInfo) GetActualSize() (int64, error) {
if crypto.IsEncrypted(o.UserDefined) {