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
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
neoppod
Commits
9e3cb905
Commit
9e3cb905
authored
Jul 10, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
30a06c97
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
10 deletions
+15
-10
go/internal/xtesting/xtesting.go
go/internal/xtesting/xtesting.go
+0
-3
go/zodb/storage/zeo/marshal.go
go/zodb/storage/zeo/marshal.go
+11
-4
go/zodb/storage/zeo/zeo.go
go/zodb/storage/zeo/zeo.go
+0
-2
go/zodb/storage/zeo/zrpc.go
go/zodb/storage/zeo/zrpc.go
+4
-1
No files found.
go/internal/xtesting/xtesting.go
View file @
9e3cb905
...
@@ -259,8 +259,6 @@ func checkLoad(t *testing.T, zdrv zodb.IStorageDriver, xid zodb.Xid, expect objS
...
@@ -259,8 +259,6 @@ func checkLoad(t *testing.T, zdrv zodb.IStorageDriver, xid zodb.Xid, expect objS
//
//
// txnvOk is what data to expect to be in the database.
// txnvOk is what data to expect to be in the database.
func
DrvTestLoad
(
t
*
testing
.
T
,
zdrv
zodb
.
IStorageDriver
,
txnvOk
[]
Txn
)
{
func
DrvTestLoad
(
t
*
testing
.
T
,
zdrv
zodb
.
IStorageDriver
,
txnvOk
[]
Txn
)
{
t
.
Helper
()
// current knowledge of what was "before" for an oid as we scan over
// current knowledge of what was "before" for an oid as we scan over
// data base entries
// data base entries
before
:=
map
[
zodb
.
Oid
]
objState
{}
before
:=
map
[
zodb
.
Oid
]
objState
{}
...
@@ -302,7 +300,6 @@ func DrvTestLoad(t *testing.T, zdrv zodb.IStorageDriver, txnvOk []Txn) {
...
@@ -302,7 +300,6 @@ func DrvTestLoad(t *testing.T, zdrv zodb.IStorageDriver, txnvOk []Txn) {
// DrvTestWatch verifies that storage driver watcher can observe commits done from outside.
// DrvTestWatch verifies that storage driver watcher can observe commits done from outside.
func
DrvTestWatch
(
t
*
testing
.
T
,
zurl
string
,
zdrvOpen
zodb
.
DriverOpener
)
{
func
DrvTestWatch
(
t
*
testing
.
T
,
zurl
string
,
zdrvOpen
zodb
.
DriverOpener
)
{
t
.
Helper
()
X
:=
FatalIf
(
t
)
X
:=
FatalIf
(
t
)
NeedPy
(
t
,
"zodbtools"
)
NeedPy
(
t
,
"zodbtools"
)
...
...
go/zodb/storage/zeo/marshal.go
View file @
9e3cb905
...
@@ -90,6 +90,7 @@ func pktEncodeM(m msg) *pktBuf {
...
@@ -90,6 +90,7 @@ func pktEncodeM(m msg) *pktBuf {
// it is interface{} - use shamaton/msgpack since msgp does not handle
// it is interface{} - use shamaton/msgpack since msgp does not handle
// arbitrary interfaces well.
// arbitrary interfaces well.
// XXX shamaton/msgpack encodes tuple(nil) as nil, not empty tuple
// XXX shamaton/msgpack encodes tuple(nil) as nil, not empty tuple
// XXX move to zLink.Call?
arg
:=
m
.
arg
arg
:=
m
.
arg
tup
,
ok
:=
arg
.
(
tuple
)
tup
,
ok
:=
arg
.
(
tuple
)
if
ok
&&
tup
==
nil
{
if
ok
&&
tup
==
nil
{
...
@@ -322,12 +323,18 @@ func (e encoding) asTuple(xt interface{}) (tuple, bool) {
...
@@ -322,12 +323,18 @@ func (e encoding) asTuple(xt interface{}) (tuple, bool) {
panic
(
"bug"
)
panic
(
"bug"
)
case
'Z'
:
case
'Z'
:
// pickle: tuples are represented by picklet.Tuple
// pickle: tuples are represented by pickle.Tuple; lists as []interface{}
t
,
ok
:=
xt
.
(
pickle
.
Tuple
)
switch
t
:=
xt
.
(
type
)
{
return
tuple
(
t
),
ok
case
pickle
.
Tuple
:
return
tuple
(
t
),
true
case
[]
interface
{}
:
return
tuple
(
t
),
true
default
:
return
tuple
(
nil
),
false
}
case
'M'
:
case
'M'
:
// msgpack: tuples are encoded as arrays; decoded as []interface{}
// msgpack: tuples
/lists
are encoded as arrays; decoded as []interface{}
t
,
ok
:=
xt
.
([]
interface
{})
t
,
ok
:=
xt
.
([]
interface
{})
return
tuple
(
t
),
ok
return
tuple
(
t
),
ok
}
}
...
...
go/zodb/storage/zeo/zeo.go
View file @
9e3cb905
...
@@ -114,8 +114,6 @@ func (z *zeo) Iterate(ctx context.Context, tidMin, tidMax zodb.Tid) zodb.ITxnIte
...
@@ -114,8 +114,6 @@ func (z *zeo) Iterate(ctx context.Context, tidMin, tidMax zodb.Tid) zodb.ITxnIte
// invalidateTransaction receives invalidations from server
// invalidateTransaction receives invalidations from server
func
(
z
*
zeo
)
invalidateTransaction
(
arg
interface
{})
(
err
error
)
{
func
(
z
*
zeo
)
invalidateTransaction
(
arg
interface
{})
(
err
error
)
{
defer
xerr
.
Context
(
&
err
,
"invalidateTransaction"
)
enc
:=
z
.
link
.
enc
enc
:=
z
.
link
.
enc
t
,
ok
:=
enc
.
asTuple
(
arg
)
t
,
ok
:=
enc
.
asTuple
(
arg
)
if
!
ok
||
len
(
t
)
!=
2
{
if
!
ok
||
len
(
t
)
!=
2
{
...
...
go/zodb/storage/zeo/zrpc.go
View file @
9e3cb905
...
@@ -189,7 +189,10 @@ func (zl *zLink) serveRecv1(pkb *pktBuf) error {
...
@@ -189,7 +189,10 @@ func (zl *zLink) serveRecv1(pkb *pktBuf) error {
return
fmt
.
Errorf
(
".%d: unknown notification %q"
,
m
.
msgid
,
m
.
method
)
return
fmt
.
Errorf
(
".%d: unknown notification %q"
,
m
.
msgid
,
m
.
method
)
}
}
f
(
m
.
arg
)
err
:=
f
(
m
.
arg
)
if
err
!=
nil
{
return
fmt
.
Errorf
(
".%d: %s: %s"
,
m
.
msgid
,
m
.
method
,
err
)
}
return
nil
return
nil
}
}
...
...
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