Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ZEO
Commits
e85f0531
Commit
e85f0531
authored
Nov 27, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '4-nxd' into 4-nxd--t
* 4-nxd: [ZEO4] Send invalidations even when empty
parents
6ac5dfab
bf80d23d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
src/ZEO/StorageServer.py
src/ZEO/StorageServer.py
+8
-7
No files found.
src/ZEO/StorageServer.py
View file @
e85f0531
...
@@ -343,8 +343,7 @@ class ZEOStorage:
...
@@ -343,8 +343,7 @@ class ZEOStorage:
self
.
storage
.
pack
(
time
,
referencesf
)
self
.
storage
.
pack
(
time
,
referencesf
)
self
.
log
(
"pack(time=%s) complete"
%
repr
(
time
))
self
.
log
(
"pack(time=%s) complete"
%
repr
(
time
))
# Broadcast new size statistics
# Broadcast new size statistics
self
.
server
.
invalidate
(
0
,
self
.
storage_id
,
None
,
self
.
server
.
invalidate
(
None
,
self
.
storage_id
,
info
=
self
.
get_size_info
())
(),
self
.
get_size_info
())
def
new_oids
(
self
,
n
=
100
):
def
new_oids
(
self
,
n
=
100
):
"""Return a sequence of n new oids, where n defaults to 100"""
"""Return a sequence of n new oids, where n defaults to 100"""
...
@@ -414,8 +413,7 @@ class ZEOStorage:
...
@@ -414,8 +413,7 @@ class ZEOStorage:
return
Result
(
tid
,
self
.
_clear_transaction
)
return
Result
(
tid
,
self
.
_clear_transaction
)
def
_invalidate
(
self
,
tid
):
def
_invalidate
(
self
,
tid
):
if
self
.
invalidated
:
self
.
server
.
invalidate
(
self
,
self
.
storage_id
,
tid
,
self
.
invalidated
)
self
.
server
.
invalidate
(
self
,
self
.
storage_id
,
tid
,
self
.
invalidated
)
def
tpc_abort
(
self
,
tid
):
def
tpc_abort
(
self
,
tid
):
if
not
self
.
_check_tid
(
tid
):
if
not
self
.
_check_tid
(
tid
):
...
@@ -1052,7 +1050,7 @@ class StorageServer:
...
@@ -1052,7 +1050,7 @@ class StorageServer:
pass
pass
def
invalidate
(
self
,
conn
,
storage_id
,
tid
,
invalidated
=
()
,
info
=
None
):
def
invalidate
(
self
,
conn
,
storage_id
,
tid
=
None
,
invalidated
=
None
,
info
=
None
):
"""Internal: broadcast info and invalidations to clients.
"""Internal: broadcast info and invalidations to clients.
This is called from several ZEOStorage methods.
This is called from several ZEOStorage methods.
...
@@ -1098,15 +1096,18 @@ class StorageServer:
...
@@ -1098,15 +1096,18 @@ class StorageServer:
# to cactch and ignore Disconnected errors.
# to cactch and ignore Disconnected errors.
if
invalidated
:
if
invalidated
is
not
None
:
assert
tid
is
not
None
invq
=
self
.
invq
[
storage_id
]
invq
=
self
.
invq
[
storage_id
]
if
len
(
invq
)
>=
self
.
invq_bound
:
if
len
(
invq
)
>=
self
.
invq_bound
:
invq
.
pop
()
invq
.
pop
()
invq
.
insert
(
0
,
(
tid
,
invalidated
))
invq
.
insert
(
0
,
(
tid
,
invalidated
))
else
:
assert
info
is
not
None
for
p
in
self
.
connections
[
storage_id
]:
for
p
in
self
.
connections
[
storage_id
]:
try
:
try
:
if
invalidated
and
p
is
not
conn
:
if
invalidated
is
not
None
and
p
is
not
conn
:
p
.
client
.
invalidateTransaction
(
tid
,
invalidated
)
p
.
client
.
invalidateTransaction
(
tid
,
invalidated
)
elif
info
is
not
None
:
elif
info
is
not
None
:
p
.
client
.
info
(
info
)
p
.
client
.
info
(
info
)
...
...
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