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
0b414488
Commit
0b414488
authored
Feb 26, 2024
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage: reject transactions that affect too many OIDs (rather than crashing)
parent
071c6bf5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
neo/storage/transactions.py
neo/storage/transactions.py
+6
-0
No files found.
neo/storage/transactions.py
View file @
0b414488
...
@@ -233,6 +233,12 @@ class TransactionManager(EventQueue):
...
@@ -233,6 +233,12 @@ class TransactionManager(EventQueue):
object_list
=
transaction
.
store_dict
.
itervalues
()
object_list
=
transaction
.
store_dict
.
itervalues
()
if
txn_info
:
if
txn_info
:
user
,
desc
,
ext
,
oid_list
,
pack
=
txn_info
user
,
desc
,
ext
,
oid_list
,
pack
=
txn_info
# Check MySQL limitation (MEDIUMBLOB). It is enforced to all
# backends in order to avoid issues when switching to MySQL.
# Anyway, next limitation would be at protocol level.
if
not
(
len
(
oid_list
)
<
0x200000
>
len
(
pack
and
pack
[
0
]
or
())):
raise
ProtocolError
(
"Too many modified OIDs (the default"
" storage backend has a limitation of 2^21-1)"
)
txn_info
=
oid_list
,
user
,
desc
,
ext
,
False
,
ttid
txn_info
=
oid_list
,
user
,
desc
,
ext
,
False
,
ttid
transaction
.
voted
=
2
transaction
.
voted
=
2
else
:
else
:
...
...
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