fix size accounting for encrypted/compressed objects (#9690)

size calculation in crawler was using the real size
of the object instead of its actual size i.e either
a decrypted or uncompressed size.

this is needed to make sure all other accounting
such as bucket quota and mcs UI to display the
correct values.
This commit is contained in:
Harshavardhana
2020-05-24 11:19:17 -07:00
committed by GitHub
parent bc285cf0dd
commit 0c71ce3398
9 changed files with 70 additions and 126 deletions
+1 -1
View File
@@ -521,7 +521,7 @@ func TestGetActualSize(t *testing.T) {
},
}
for i, test := range testCases {
got := test.objInfo.GetActualSize()
got, _ := test.objInfo.GetActualSize()
if got != test.result {
t.Errorf("Test %d - expected %d but received %d",
i+1, test.result, got)