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
33fab6e3
Commit
33fab6e3
authored
May 06, 2024
by
Levin Zimmermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "proto: Switch 'compress' type on the wire from Optional[int] to bool"
This reverts commit
93f25df5
.
parent
93f25df5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
5 deletions
+7
-5
neo/client/app.py
neo/client/app.py
+1
-1
neo/storage/database/importer.py
neo/storage/database/importer.py
+1
-1
neo/storage/database/manager.py
neo/storage/database/manager.py
+3
-3
neo/storage/handlers/client.py
neo/storage/handlers/client.py
+2
-0
No files found.
neo/client/app.py
View file @
33fab6e3
...
@@ -506,7 +506,7 @@ class Application(ThreadedApplication):
...
@@ -506,7 +506,7 @@ class Application(ThreadedApplication):
checksum
=
makeChecksum
(
compressed_data
)
checksum
=
makeChecksum
(
compressed_data
)
txn_context
.
data_size
+=
size
txn_context
.
data_size
+=
size
# Store object in tmp cache
# Store object in tmp cache
packet
=
Packets
.
AskStoreObject
(
oid
,
serial
,
bool
(
compression
)
,
packet
=
Packets
.
AskStoreObject
(
oid
,
serial
,
compression
,
checksum
,
compressed_data
,
data_serial
,
ttid
)
checksum
,
compressed_data
,
data_serial
,
ttid
)
txn_context
.
data_dict
[
oid
]
=
data
,
serial
,
txn_context
.
write
(
txn_context
.
data_dict
[
oid
]
=
data
,
serial
,
txn_context
.
write
(
self
,
packet
,
oid
,
oid
=
oid
,
serial
=
serial
)
self
,
packet
,
oid
,
oid
=
oid
,
serial
=
serial
)
...
...
neo/storage/database/importer.py
View file @
33fab6e3
...
@@ -619,7 +619,7 @@ class ImporterDatabaseManager(DatabaseManager):
...
@@ -619,7 +619,7 @@ class ImporterDatabaseManager(DatabaseManager):
if
next_serial
:
if
next_serial
:
next_serial
=
p64
(
next_serial
)
next_serial
=
p64
(
next_serial
)
return
(
serial
,
next_serial
,
return
(
serial
,
next_serial
,
False
,
checksum
,
value
,
zodb
.
getDataTid
(
z_oid
,
u_tid
))
0
,
checksum
,
value
,
zodb
.
getDataTid
(
z_oid
,
u_tid
))
def
getTransaction
(
self
,
tid
,
all
=
False
):
def
getTransaction
(
self
,
tid
,
all
=
False
):
u64
=
util
.
u64
u64
=
util
.
u64
...
...
neo/storage/database/manager.py
View file @
33fab6e3
...
@@ -474,7 +474,7 @@ class DatabaseManager(object):
...
@@ -474,7 +474,7 @@ class DatabaseManager(object):
6-tuple: Record content.
6-tuple: Record content.
- record serial (packed)
- record serial (packed)
- serial or next record modifying object (packed, None)
- serial or next record modifying object (packed, None)
- compression (boolean)
- compression (boolean
-ish, None
)
- checksum (binary string, None)
- checksum (binary string, None)
- data (binary string, None)
- data (binary string, None)
- data_serial (packed, None)
- data_serial (packed, None)
...
@@ -489,7 +489,7 @@ class DatabaseManager(object):
...
@@ -489,7 +489,7 @@ class DatabaseManager(object):
return
(
tid
or
before_tid
)
and
self
.
getLastObjectTID
(
oid
)
and
False
return
(
tid
or
before_tid
)
and
self
.
getLastObjectTID
(
oid
)
and
False
return
(
util
.
p64
(
serial
),
return
(
util
.
p64
(
serial
),
None
if
next_serial
is
None
else
util
.
p64
(
next_serial
),
None
if
next_serial
is
None
else
util
.
p64
(
next_serial
),
bool
(
compression
)
,
checksum
,
data
,
compression
,
checksum
,
data
,
None
if
data_serial
is
None
else
util
.
p64
(
data_serial
))
None
if
data_serial
is
None
else
util
.
p64
(
data_serial
))
@
fallback
@
fallback
...
@@ -511,7 +511,7 @@ class DatabaseManager(object):
...
@@ -511,7 +511,7 @@ class DatabaseManager(object):
r
=
self
.
_fetchObject
(
u64
(
oid
),
u64
(
tid
))
r
=
self
.
_fetchObject
(
u64
(
oid
),
u64
(
tid
))
if
r
:
if
r
:
serial
,
compression
,
checksum
,
data
,
data_serial
=
r
serial
,
compression
,
checksum
,
data
,
data_serial
=
r
return
(
util
.
p64
(
serial
),
bool
(
compression
)
,
checksum
,
data
,
return
(
util
.
p64
(
serial
),
compression
,
checksum
,
data
,
None
if
data_serial
is
None
else
util
.
p64
(
data_serial
))
None
if
data_serial
is
None
else
util
.
p64
(
data_serial
))
@
requires
(
_getPartitionTable
)
@
requires
(
_getPartitionTable
)
...
...
neo/storage/handlers/client.py
View file @
33fab6e3
...
@@ -114,6 +114,8 @@ class ClientOperationHandler(BaseHandler):
...
@@ -114,6 +114,8 @@ class ClientOperationHandler(BaseHandler):
def
askStoreObject
(
self
,
conn
,
oid
,
serial
,
def
askStoreObject
(
self
,
conn
,
oid
,
serial
,
compression
,
checksum
,
data
,
data_serial
,
ttid
):
compression
,
checksum
,
data
,
data_serial
,
ttid
):
if
1
<
compression
:
raise
ProtocolError
(
'invalid compression value'
)
# register the transaction
# register the transaction
self
.
app
.
tm
.
register
(
conn
,
ttid
)
self
.
app
.
tm
.
register
(
conn
,
ttid
)
if
data
or
checksum
!=
ZERO_HASH
:
if
data
or
checksum
!=
ZERO_HASH
:
...
...
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