Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
34f4f310
Commit
34f4f310
authored
Sep 08, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
~staticcheck
parent
d99bf118
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
24 additions
and
24 deletions
+24
-24
go/internal/xtesting/xtesting.go
go/internal/xtesting/xtesting.go
+1
-1
go/neo/client.go
go/neo/client.go
+1
-3
go/neo/mastered.go
go/neo/mastered.go
+2
-2
go/zodb/btree/btree.go.in
go/zodb/btree/btree.go.in
+3
-3
go/zodb/btree/testdata/gen-testdata
go/zodb/btree/testdata/gen-testdata
+3
-3
go/zodb/btree/ziobtree.go
go/zodb/btree/ziobtree.go
+5
-3
go/zodb/btree/zlobtree.go
go/zodb/btree/zlobtree.go
+3
-3
go/zodb/py/pydata-gen-testdata
go/zodb/py/pydata-gen-testdata
+3
-3
go/zodb/storage/fs1/format.go
go/zodb/storage/fs1/format.go
+1
-1
go/zodb/storage/zeo/proto.go
go/zodb/storage/zeo/proto.go
+2
-2
No files found.
go/internal/xtesting/xtesting.go
View file @
34f4f310
...
...
@@ -388,7 +388,7 @@ func DrvTestWatch(t *testing.T, zurl string, zdrvOpen zodb.DriverOpener, bugv ..
ctx
:=
context
.
Background
()
watchq
:=
make
(
chan
zodb
.
Event
)
zdrv
,
at0
,
err
:=
zdrvOpen
(
ctx
,
u
,
&
zodb
.
DriverOptions
{
ReadOnly
:
true
,
Watchq
:
watchq
})
zdrv
,
at0
,
err
:=
zdrvOpen
(
ctx
,
u
,
&
zodb
.
DriverOptions
{
ReadOnly
:
true
,
Watchq
:
watchq
})
;
X
(
err
)
if
at0
!=
at
{
t
.
Fatalf
(
"opened @ %s ; want %s"
,
at0
,
at
)
}
...
...
go/neo/client.go
View file @
34f4f310
...
...
@@ -457,9 +457,7 @@ func openClientByURL(ctx context.Context, u *url.URL, opt *zodb.DriverOptions) (
}
name
:=
u
.
Path
if
strings
.
HasPrefix
(
name
,
"/"
)
{
name
=
name
[
1
:
]
}
name
=
strings
.
TrimPrefix
(
name
,
"/"
)
if
name
==
""
{
return
nil
,
zodb
.
InvalidTid
,
fmt
.
Errorf
(
"cluster name not specified"
)
}
...
...
go/neo/mastered.go
View file @
34f4f310
...
...
@@ -76,12 +76,12 @@ type _MasteredNode struct {
type
_MasteredNodeFlags
int
const
(
// δPartTabPassThrough tells mlink.Recv1 not to filter out messages related
// to partition table changes. When mlink.Recv1 receives such messages the
re
// to partition table changes. When mlink.Recv1 receives such messages the
y
// are already processed internally to update .state.PartTab correspondingly.
//
// Storage uses this mode to receive δPartTab notifications to know
// when to persist it.
δPartTabPassThrough
_MasteredNodeFlags
=
iota
δPartTabPassThrough
_MasteredNodeFlags
=
1
<<
iota
)
// newMasteredNode creates new _MasteredNode that connects to masterAddr/cluster via net.
...
...
go/zodb/btree/btree.go.in
View file @
34f4f310
//
Copyright
(
c
)
2001
,
2002
Zope
Foundation
and
Contributors
.
//
All
Rights
Reserved
.
//
//
Copyright
(
C
)
2018
-
20
19
Nexedi
SA
and
Contributors
.
//
Copyright
(
C
)
2018
-
20
21
Nexedi
SA
and
Contributors
.
//
Kirill
Smelkov
<
kirr
@
nexedi
.
com
>
//
//
This
software
is
subject
to
the
provisions
of
the
Zope
Public
License
,
...
...
@@ -609,7 +609,7 @@ func (bt *btreeState) PySetState(pystate interface{}) (err error) {
}
if i > 1 && !(key > kprev) {
fmt.Errorf("data: [%d]: key not ↑", i)
return
fmt.Errorf("data: [%d]: key not ↑", i)
}
kprev = key
...
...
@@ -629,7 +629,7 @@ func (bt *btreeState) PySetState(pystate interface{}) (err error) {
childrenKind = kind
}
if kind != childrenKind {
fmt.Errorf("data: [%d]: children must be of the same type", i)
return
fmt.Errorf("data: [%d]: children must be of the same type", i)
}
bt.data = append(bt.data, Entry{key: kkey, child: child.(Node)})
...
...
go/zodb/btree/testdata/gen-testdata
View file @
34f4f310
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# Copyright (C) 2018-202
0
Nexedi SA and Contributors.
# Copyright (C) 2018-202
1
Nexedi SA and Contributors.
# Kirill Smelkov <kirr@nexedi.com>
#
# This program is free software: you can Use, Study, Modify and Redistribute
...
...
@@ -23,7 +23,7 @@
from
ZODB.DB
import
DB
from
BTrees.LOBTree
import
LOBucket
,
LOBTree
from
ZODB.utils
import
u64
from
zodbtools.test.gen_testdata
import
run_with_zodb
3
py2_compat
from
zodbtools.test.gen_testdata
import
run_with_zodb
4
py2_compat
import
os
,
os
.
path
,
transaction
from
golang.gcompat
import
qq
...
...
@@ -89,7 +89,7 @@ def main2():
db
.
close
()
def
main
():
run_with_zodb
3
py2_compat
(
main2
)
run_with_zodb
4
py2_compat
(
main2
)
if
__name__
==
'__main__'
:
...
...
go/zodb/btree/ziobtree.go
View file @
34f4f310
...
...
@@ -3,7 +3,7 @@
// Copyright (c) 2001, 2002 Zope Foundation and Contributors.
// All Rights Reserved.
//
// Copyright (C) 2018-20
19
Nexedi SA and Contributors.
// Copyright (C) 2018-20
21
Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
//
// This software is subject to the provisions of the Zope Public License,
...
...
@@ -197,6 +197,8 @@ func (t *IOBTree) VGet(ctx context.Context, key int32, visit func(node IONode))
return
key
<
t
.
data
[
j
]
.
key
})
// FIXME panic index out of range (empty T without children;
// logically incorrect, but Restructure generated it once)
child
:=
t
.
data
[
i
]
.
child
t
.
PDeactivate
()
err
=
child
.
PActivate
(
ctx
)
...
...
@@ -609,7 +611,7 @@ func (bt *iobtreeState) PySetState(pystate interface{}) (err error) {
}
if
i
>
1
&&
!
(
key
>
kprev
)
{
fmt
.
Errorf
(
"data: [%d]: key not ↑"
,
i
)
return
fmt
.
Errorf
(
"data: [%d]: key not ↑"
,
i
)
}
kprev
=
key
...
...
@@ -629,7 +631,7 @@ func (bt *iobtreeState) PySetState(pystate interface{}) (err error) {
childrenKind
=
kind
}
if
kind
!=
childrenKind
{
fmt
.
Errorf
(
"data: [%d]: children must be of the same type"
,
i
)
return
fmt
.
Errorf
(
"data: [%d]: children must be of the same type"
,
i
)
}
bt
.
data
=
append
(
bt
.
data
,
IOEntry
{
key
:
kkey
,
child
:
child
.
(
IONode
)})
...
...
go/zodb/btree/zlobtree.go
View file @
34f4f310
...
...
@@ -3,7 +3,7 @@
// Copyright (c) 2001, 2002 Zope Foundation and Contributors.
// All Rights Reserved.
//
// Copyright (C) 2018-20
19
Nexedi SA and Contributors.
// Copyright (C) 2018-20
21
Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
//
// This software is subject to the provisions of the Zope Public License,
...
...
@@ -611,7 +611,7 @@ func (bt *lobtreeState) PySetState(pystate interface{}) (err error) {
}
if
i
>
1
&&
!
(
key
>
kprev
)
{
fmt
.
Errorf
(
"data: [%d]: key not ↑"
,
i
)
return
fmt
.
Errorf
(
"data: [%d]: key not ↑"
,
i
)
}
kprev
=
key
...
...
@@ -631,7 +631,7 @@ func (bt *lobtreeState) PySetState(pystate interface{}) (err error) {
childrenKind
=
kind
}
if
kind
!=
childrenKind
{
fmt
.
Errorf
(
"data: [%d]: children must be of the same type"
,
i
)
return
fmt
.
Errorf
(
"data: [%d]: children must be of the same type"
,
i
)
}
bt
.
data
=
append
(
bt
.
data
,
LOEntry
{
key
:
kkey
,
child
:
child
.
(
LONode
)})
...
...
go/zodb/py/pydata-gen-testdata
View file @
34f4f310
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# Copyright (C) 2017-202
0
Nexedi SA and Contributors.
# Copyright (C) 2017-202
1
Nexedi SA and Contributors.
# Kirill Smelkov <kirr@nexedi.com>
#
# This program is free software: you can Use, Study, Modify and Redistribute
...
...
@@ -21,7 +21,7 @@
"""generate reference pickle objects encoding for tests"""
from
ZODB
import
serialize
from
zodbtools.test.gen_testdata
import
run_with_zodb
3
py2_compat
from
zodbtools.test.gen_testdata
import
run_with_zodb
4
py2_compat
from
golang.gcompat
import
qq
def
main2
():
...
...
@@ -56,7 +56,7 @@ def main2():
emit
(
"}"
)
def
main
():
run_with_zodb
3
py2_compat
(
main2
)
run_with_zodb
4
py2_compat
(
main2
)
if
__name__
==
'__main__'
:
main
()
go/zodb/storage/fs1/format.go
View file @
34f4f310
...
...
@@ -207,7 +207,7 @@ func (txnh *TxnHeader) CloneFrom(txnh2 *TxnHeader) {
type
TxnLoadFlags
int
const
(
LoadAll
TxnLoadFlags
=
0x00
// load whole transaction header
LoadNoStrings
=
0x01
// do not load user/desc/ext strings
LoadNoStrings
TxnLoadFlags
=
0x01
// do not load user/desc/ext strings
)
// Load reads and decodes transaction record header @ pos.
...
...
go/zodb/storage/zeo/proto.go
View file @
34f4f310
// Copyright (C) 2018-202
0
Nexedi SA and Contributors.
// Copyright (C) 2018-202
1
Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
//
// This program is free software: you can Use, Study, Modify and Redistribute
...
...
@@ -54,7 +54,7 @@ type msg struct {
type
msgFlags
int64
const
(
msgAsync
msgFlags
=
1
// message does not need a reply
msgExcept
=
2
// exception was raised on remote side (ZEO5)
msgExcept
msgFlags
=
2
// exception was raised on remote side (ZEO5)
)
// encoding represents messages encoding.
...
...
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