Commit 4afa4baf authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 5e9a3cb7
......@@ -400,12 +400,13 @@ func (c *Client) Load(ctx context.Context, xid zodb.Xid) (data []byte, serial zo
return nil, 0, err // XXX err context
}
data = resp.Data
checksum := sha1.Sum(data)
if checksum != resp.Checksum {
return nil, 0, fmt.Errorf("data corrupt: checksum mismatch")
}
data = resp.Data
if resp.Compression {
data, err = decompress(resp.Data, make([]byte, 0, len(resp.Data)))
if err != nil {
......
......@@ -471,7 +471,7 @@ func TestMasterStorage(t *testing.T) {
Checksum: sha1.Sum(data1),
}))
println("444")
xwait(wg)
// C loads every other {<,=}serial:oid - established link is reused
ziter := zstor.Iterate(0, zodb.TidMax)
......
......@@ -201,8 +201,6 @@ import (
"sync"
"sync/atomic"
"unsafe"
"fmt"
)
// big tracing lock
......@@ -337,7 +335,6 @@ func (pg *ProbeGroup) Done() {
defer Unlock()
for _, p := range pg.probev {
fmt.Printf("detaching %#v\n", p)
p.Detach()
}
pg.probev = nil
......
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