Commit c2eac94f authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 1e679687
...@@ -381,6 +381,9 @@ func (c *Client) LastOid(ctx context.Context) (zodb.Oid, error) { ...@@ -381,6 +381,9 @@ 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) { func (c *Client) Load(ctx context.Context, xid zodb.Xid) (data []byte, serial zodb.Tid, err error) {
defer func() { defer func() {
switch err.(type) { switch err.(type) {
case nil:
// ok (avoid allocation in xerr.Contextf() call for no-error case)
// keep zodb errors intact // keep zodb errors intact
// XXX ok? or requre users always call Cause? // XXX ok? or requre users always call Cause?
case *zodb.ErrOidMissing: case *zodb.ErrOidMissing:
...@@ -398,7 +401,7 @@ func (c *Client) Load(ctx context.Context, xid zodb.Xid) (data []byte, serial zo ...@@ -398,7 +401,7 @@ func (c *Client) Load(ctx context.Context, xid zodb.Xid) (data []byte, serial zo
// here we have cluster state operational and rlocked. Retrieve // here we have cluster state operational and rlocked. Retrieve
// storages we might need to access and release the lock. // storages we might need to access and release the lock.
storv := make([]*neo.Node, 0) storv := make([]*neo.Node, 0, 1)
for _, cell := range c.node.PartTab.Get(xid.Oid) { for _, cell := range c.node.PartTab.Get(xid.Oid) {
if cell.Readable() { if cell.Readable() {
stor := c.node.NodeTab.Get(cell.UUID) stor := c.node.NodeTab.Get(cell.UUID)
......
...@@ -404,8 +404,10 @@ func (c *Conn) Close() error { ...@@ -404,8 +404,10 @@ func (c *Conn) Close() error {
// ( we cannot reuse same connection since after it is marked as // ( we cannot reuse same connection since after it is marked as
// closed Send refuses to work ) // closed Send refuses to work )
} else { } else {
// c implicitly goes away from connTab delete(nl.connTab, c.connId)
tmpclosed = nl.newConn(c.connId) // XXX temp. disabled - costs a lot in 1req=1conn model
// // c implicitly goes away from connTab
// tmpclosed = nl.newConn(c.connId)
} }
} }
nl.connMu.Unlock() nl.connMu.Unlock()
......
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