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
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
//
// txnvOk is what data to expect to be in the database.
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
// data base entries
before
:=
map
[
zodb
.
Oid
]
objState
{}
...
...
@@ -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.
func
DrvTestWatch
(
t
*
testing
.
T
,
zurl
string
,
zdrvOpen
zodb
.
DriverOpener
)
{
t
.
Helper
()
X
:=
FatalIf
(
t
)
NeedPy
(
t
,
"zodbtools"
)
...
...
go/zodb/storage/zeo/marshal.go
View file @
9e3cb905
...
...
@@ -90,6 +90,7 @@ func pktEncodeM(m msg) *pktBuf {
// it is interface{} - use shamaton/msgpack since msgp does not handle
// arbitrary interfaces well.
// XXX shamaton/msgpack encodes tuple(nil) as nil, not empty tuple
// XXX move to zLink.Call?
arg
:=
m
.
arg
tup
,
ok
:=
arg
.
(
tuple
)
if
ok
&&
tup
==
nil
{
...
...
@@ -322,12 +323,18 @@ func (e encoding) asTuple(xt interface{}) (tuple, bool) {
panic
(
"bug"
)
case
'Z'
:
// pickle: tuples are represented by picklet.Tuple
t
,
ok
:=
xt
.
(
pickle
.
Tuple
)
return
tuple
(
t
),
ok
// pickle: tuples are represented by pickle.Tuple; lists as []interface{}
switch
t
:=
xt
.
(
type
)
{
case
pickle
.
Tuple
:
return
tuple
(
t
),
true
case
[]
interface
{}
:
return
tuple
(
t
),
true
default
:
return
tuple
(
nil
),
false
}
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
{})
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
// invalidateTransaction receives invalidations from server
func
(
z
*
zeo
)
invalidateTransaction
(
arg
interface
{})
(
err
error
)
{
defer
xerr
.
Context
(
&
err
,
"invalidateTransaction"
)
enc
:=
z
.
link
.
enc
t
,
ok
:=
enc
.
asTuple
(
arg
)
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 {
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
}
...
...
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