Commit dcb7f34c authored by Kirill Smelkov's avatar Kirill Smelkov

X M,C,S works - cluster could start and client connected and could get pt and...

X M,C,S works - cluster could start and client connected and could get pt and nodetab from M; attach to S and read all objects from there; yay!
parent 4afa4baf
......@@ -347,7 +347,17 @@ func (c *Client) LastOid(ctx context.Context) (zodb.Oid, error) {
}
func (c *Client) Load(ctx context.Context, xid zodb.Xid) (data []byte, serial zodb.Tid, err error) {
defer xerr.Contextf(&err, "client: load %v", xid) // XXX keep zodb errors intact?
defer func() {
switch err.(type) {
// keep zodb errors intact
// XXX ok? or requre users always call Cause?
case *zodb.ErrOidMissing:
case *zodb.ErrXidMissing:
default:
xerr.Contextf(&err, "client: load %v", xid)
}
}()
err = c.withOperational(ctx)
if err != nil {
......
......@@ -507,9 +507,7 @@ func TestMasterStorage(t *testing.T) {
xid.Tid++
}
println("555")
data, tid, err := C.Load(bg, xid)
println("777")
if datai.Data != nil {
if !(bytes.Equal(data, datai.Data) && tid == datai.Tid && err == nil) {
t.Fatalf("load: %v:\nhave: %v %v %q\nwant: %v nil %q",
......
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