Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
neoppod
Commits
c2eac94f
Commit
c2eac94f
authored
Sep 06, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
1e679687
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
go/neo/client/client.go
go/neo/client/client.go
+4
-1
go/neo/connection.go
go/neo/connection.go
+4
-2
No files found.
go/neo/client/client.go
View file @
c2eac94f
...
@@ -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
)
...
...
go/neo/connection.go
View file @
c2eac94f
...
@@ -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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment