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
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
ZEO
Commits
3a89a6c4
Commit
3a89a6c4
authored
Jan 06, 2004
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure both databases are up to date before checking trees for
missing keys.
parent
77551779
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
6 deletions
+25
-6
src/ZEO/tests/InvalidationTests.py
src/ZEO/tests/InvalidationTests.py
+25
-6
No files found.
src/ZEO/tests/InvalidationTests.py
View file @
3a89a6c4
...
...
@@ -452,6 +452,7 @@ class InvalidationTests:
cn
=
db1
.
open
()
tree
=
cn
.
root
()[
"tree"
]
=
OOBTree
()
get_transaction
().
commit
()
cn
.
close
()
# Run two threads that update the BTree
cd
=
{}
...
...
@@ -459,7 +460,11 @@ class InvalidationTests:
t2
=
self
.
StressThread
(
self
,
db2
,
stop
,
2
,
cd
,
2
)
self
.
go
(
stop
,
cd
,
t1
,
t2
)
cn
.
sync
()
while
db1
.
lastTransaction
()
!=
db2
.
lastTransaction
():
db1
.
_storage
.
sync
()
db2
.
_storage
.
sync
()
cn
=
db1
.
open
()
self
.
_check_tree
(
cn
,
tree
)
self
.
_check_threads
(
tree
,
t1
,
t2
)
...
...
@@ -475,6 +480,7 @@ class InvalidationTests:
cn
=
db1
.
open
()
tree
=
cn
.
root
()[
"tree"
]
=
OOBTree
()
get_transaction
().
commit
()
cn
.
close
()
# Run two threads that update the BTree
cd
=
{}
...
...
@@ -482,7 +488,7 @@ class InvalidationTests:
t2
=
self
.
StressThread
(
self
,
db1
,
stop
,
2
,
cd
,
2
,
sleep
=
0.01
)
self
.
go
(
stop
,
cd
,
t1
,
t2
)
cn
.
sync
()
cn
=
db1
.
open
()
self
.
_check_tree
(
cn
,
tree
)
self
.
_check_threads
(
tree
,
t1
,
t2
)
...
...
@@ -498,6 +504,7 @@ class InvalidationTests:
cn
=
db1
.
open
()
tree
=
cn
.
root
()[
"tree"
]
=
OOBTree
()
get_transaction
().
commit
()
cn
.
close
()
# Run three threads that update the BTree.
# Two of the threads share a single storage so that it
...
...
@@ -510,7 +517,11 @@ class InvalidationTests:
t3
=
self
.
StressThread
(
self
,
db2
,
stop
,
3
,
cd
,
3
,
3
,
0.01
)
self
.
go
(
stop
,
cd
,
t1
,
t2
,
t3
)
cn
.
sync
()
while
db1
.
lastTransaction
()
!=
db2
.
lastTransaction
():
db1
.
_storage
.
sync
()
db2
.
_storage
.
sync
()
cn
=
db1
.
open
()
self
.
_check_tree
(
cn
,
tree
)
self
.
_check_threads
(
tree
,
t1
,
t2
,
t3
)
...
...
@@ -527,6 +538,7 @@ class InvalidationTests:
cn
=
db1
.
open
()
tree
=
cn
.
root
()[
"tree"
]
=
OOBTree
()
get_transaction
().
commit
()
cn
.
close
()
# Run three threads that update the BTree.
# Two of the threads share a single storage so that it
...
...
@@ -537,10 +549,13 @@ class InvalidationTests:
t1
=
VersionStressThread
(
self
,
db1
,
stop
,
1
,
cd
,
1
,
3
)
t2
=
VersionStressThread
(
self
,
db2
,
stop
,
2
,
cd
,
2
,
3
,
0.01
)
t3
=
VersionStressThread
(
self
,
db2
,
stop
,
3
,
cd
,
3
,
3
,
0.01
)
## t1 = VersionStressThread(self, db2, stop, 3, cd, 1, 3, 0.01)
self
.
go
(
stop
,
cd
,
t1
,
t2
,
t3
)
cn
.
sync
()
while
db1
.
lastTransaction
()
!=
db2
.
lastTransaction
():
db1
.
_storage
.
sync
()
db2
.
_storage
.
sync
()
cn
=
db1
.
open
()
self
.
_check_tree
(
cn
,
tree
)
self
.
_check_threads
(
tree
,
t1
,
t2
,
t3
)
...
...
@@ -560,6 +575,7 @@ class InvalidationTests:
for
i
in
range
(
0
,
3000
,
2
):
tree
[
i
]
=
0
get_transaction
().
commit
()
cn
.
close
()
# Run three threads that update the BTree.
# Two of the threads share a single storage so that it
...
...
@@ -572,7 +588,10 @@ class InvalidationTests:
t3
=
LargeUpdatesThread
(
self
,
db2
,
stop
,
3
,
cd
,
3
,
3
,
0.01
)
self
.
go
(
stop
,
cd
,
t1
,
t2
,
t3
)
cn
.
sync
()
while
db1
.
lastTransaction
()
!=
db2
.
lastTransaction
():
db1
.
_storage
.
sync
()
db2
.
_storage
.
sync
()
cn
=
db1
.
open
()
self
.
_check_tree
(
cn
,
tree
)
# Purge the tree of the dummy entries mapping to 0.
...
...
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