Commit 2677c346 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent fb3dcb0d
......@@ -22,7 +22,7 @@ package client
import (
"context"
"crypto/sha1"
//"crypto/sha1"
"fmt"
"math/rand"
"net/url"
......@@ -448,10 +448,10 @@ func (c *Client) Load(ctx context.Context, xid zodb.Xid) (data []byte, serial zo
data = resp.Data
checksum := sha1.Sum(data)
if checksum != resp.Checksum {
return nil, 0, fmt.Errorf("data corrupt: checksum mismatch")
}
//checksum := sha1.Sum(data)
//if checksum != resp.Checksum {
// return nil, 0, fmt.Errorf("data corrupt: checksum mismatch")
//}
if resp.Compression {
data, err = decompress(resp.Data, make([]byte, 0, len(resp.Data)))
......
......@@ -22,7 +22,7 @@ package server
import (
"context"
"crypto/sha1"
//"crypto/sha1"
"fmt"
"sync"
"time"
......@@ -514,7 +514,7 @@ func (stor *Storage) serveClient1(ctx context.Context, req neo.Msg) (resp neo.Ms
Compression: false,
Data: data,
Checksum: sha1.Sum(data), // XXX computing every time
//Checksum: sha1.Sum(data), // XXX computing every time
// XXX .NextSerial
// XXX .DataSerial
......
......@@ -280,7 +280,7 @@ bench1() {
return
fi
go run zsha1.go --log_dir=$log $url
go run zsha1.go --log_dir=$log -useprefetch $url
# go run zsha1.go --log_dir=$log -useprefetch $url
}
echo -e "\n*** FileStorage"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment