Skip to content

Commit

Permalink
don't compare checksums of different types
Browse files Browse the repository at this point in the history
* related commit: 07e1e0b

Signed-off-by: Alex Aizman <[email protected]>
  • Loading branch information
alex-aizman committed Dec 15, 2023
1 parent bec1dd5 commit e00a1ea
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
14 changes: 6 additions & 8 deletions ais/test/regression_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,9 @@ func TestListObjectsLocalGetLocation(t *testing.T) {
})

_, err = api.GetObject(baseParams, m.bck, e.Name, nil)

// TODO -- FIXME: see cmn.ConfigRestartRequired and cmn.Features
// tassert.Errorf(t, err != nil, "expected intra-cluster access enforced")
tlog.Logf("TODO: updating feature flags requires cluster restart (err=%v)\n", err)

if err == nil {
tlog.Logln("Warning: expected error, got nil")
}
tools.SetClusterConfig(t, cos.StrKVs{"features": "0"})
}
}
Expand Down Expand Up @@ -201,9 +199,9 @@ func TestListObjectsCloudGetLocation(t *testing.T) {
tools.SetClusterConfig(t, cos.StrKVs{"features": feat.EnforceIntraClusterAccess.Value()})
_, err = api.GetObject(baseParams, m.bck, e.Name, nil)

// TODO -- FIXME: see cmn.ConfigRestartRequired and cmn.Features
// tassert.Errorf(t, err != nil, "expected intra-cluster access enforced")
tlog.Logf("TODO: updating feature flags requires cluster restart (err=%v)\n", err)
if err == nil {
tlog.Logln("Warning: expected error, got nil")
}

tools.SetClusterConfig(t, cos.StrKVs{"features": "0"})
}
Expand Down
6 changes: 3 additions & 3 deletions cmn/objattrs.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,11 @@ func (oa *ObjAttrs) Equal(rem cos.OAH) (eq bool) {
}

// checksum check
if !rem.Checksum().IsEmpty() && !oa.Cksum.IsEmpty() {
if !rem.Checksum().Equal(oa.Cksum) {
if a, b := rem.Checksum(), oa.Cksum; !a.IsEmpty() && !b.IsEmpty() && a.Ty() == b.Ty() {
if !a.Equal(b) {
return false
}
cksumVal = oa.Cksum.Val()
cksumVal = a.Val()
count++
}

Expand Down

0 comments on commit e00a1ea

Please sign in to comment.