Verify bitrot in ReadFile correctly when verifier is set (#6563)

This is a major regression introduced in this commit

ce02ab613d is the first bad commit
commit ce02ab613d
Author: Krishna Srinivas <634494+krishnasrinivas@users.noreply.github.com>
Date:   Mon Aug 6 15:14:08 2018 -0700

    Simplify erasure code by separating bitrot from erasure code (#5959)

:040000 040000 794f58d82a d2201ebfc8 M	cmd

This effects all distributed server deployments since this commit

All the following releases are affected

- RELEASE.2018-09-25T21-34-43Z
- RELEASE.2018-09-12T18-49-56Z
- RELEASE.2018-09-11T01-39-21Z
- RELEASE.2018-09-01T00-38-25Z
- RELEASE.2018-08-25T01-56-38Z
- RELEASE.2018-08-21T00-37-20Z
- RELEASE.2018-08-18T03-49-57Z

Thanks to Anis for reproducing the issue
This commit is contained in:
Harshavardhana 2018-10-04 10:16:38 -07:00 committed by kannappanr
parent 02ad9d6072
commit c2b7b82ef4
1 changed files with 1 additions and 1 deletions

View File

@ -242,7 +242,7 @@ func (client *StorageRPCClient) ReadFile(volume string, path string, offset int6
Path: path,
Offset: offset,
Length: int64(len(buffer)),
Verified: true, // mark read as verified by default
Verified: verifier == nil, // Marked accordingly if verifier is set or not.
}
if verifier != nil {
args.Algo = verifier.algorithm