mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
fix: allow DeleteObject unversioned objects with insufficient read quorum (#19581)
Since the object is being permanently deleted, the lack of read quorum should not matter as long as sufficient disks are online to complete the deletion with parity requirements. If several pools have the same object with insufficient read quorum, attempt to delete object from all the pools where it exists
This commit is contained in:
@@ -210,13 +210,13 @@ func TestFindFileInfoInQuorum(t *testing.T) {
|
||||
{
|
||||
fis: getNFInfo(16, 7, 1603863445, "36a21454-a2ca-11eb-bbaa-93a81c686f21", nil),
|
||||
modTime: time.Unix(1603863445, 0),
|
||||
expectedErr: errErasureReadQuorum,
|
||||
expectedErr: InsufficientReadQuorum{},
|
||||
expectedQuorum: 8,
|
||||
},
|
||||
{
|
||||
fis: getNFInfo(16, 16, 1603863445, "36a21454-a2ca-11eb-bbaa-93a81c686f21", nil),
|
||||
modTime: time.Unix(1603863445, 0),
|
||||
expectedErr: errErasureReadQuorum,
|
||||
expectedErr: InsufficientReadQuorum{},
|
||||
expectedQuorum: 0,
|
||||
},
|
||||
{
|
||||
@@ -241,7 +241,9 @@ func TestFindFileInfoInQuorum(t *testing.T) {
|
||||
test := test
|
||||
t.Run("", func(t *testing.T) {
|
||||
fi, err := findFileInfoInQuorum(context.Background(), test.fis, test.modTime, "", test.expectedQuorum)
|
||||
if err != test.expectedErr {
|
||||
_, ok1 := err.(InsufficientReadQuorum)
|
||||
_, ok2 := test.expectedErr.(InsufficientReadQuorum)
|
||||
if ok1 != ok2 {
|
||||
t.Errorf("Expected %s, got %s", test.expectedErr, err)
|
||||
}
|
||||
if test.succmodTimes != nil {
|
||||
|
||||
Reference in New Issue
Block a user