Revert validation mismatch temp file persistence

This commit reverts 4e469f8 which was used for debugging the validation
stall corruption issue. It can cause the disk to fill with temporary
files though so it is being reverted.
This commit is contained in:
Ben Johnson
2021-02-09 06:44:39 -07:00
parent 962a2a894b
commit 37442babfb
3 changed files with 8 additions and 16 deletions

View File

@@ -1049,11 +1049,12 @@ func ValidateReplica(ctx context.Context, r Replica) error {
if err != nil {
return err
}
defer os.RemoveAll(tmpdir)
// Compute checksum of primary database under lock. This prevents a
// sync from occurring and the database will not be written.
primaryPath := filepath.Join(tmpdir, "primary")
chksum0, pos, err := db.CRC64(primaryPath)
chksum0, pos, err := db.CRC64()
if err != nil {
return fmt.Errorf("cannot compute checksum: %w", err)
}