Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
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
Kirill Smelkov
ZODB
Commits
75114360
Commit
75114360
authored
Jun 29, 2004
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a collaboration for a new savepoint model.
Updated an old collaboration to reflect the change.
parent
4fc06850
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
82 additions
and
1 deletion
+82
-1
src/ZODB/collaborations.txt
src/ZODB/collaborations.txt
+82
-1
No files found.
src/ZODB/collaborations.txt
View file @
75114360
...
...
@@ -28,7 +28,7 @@ Scenario
# in the changed state.
T.commit()
C.beforeCompletion(T)
C.tpc_begin(T
, False
)
C.tpc_begin(T)
S.tpc_begin(T)
C.commit(T)
S.store(1, ..., T)
...
...
@@ -89,3 +89,84 @@ Scenario
C._flush_invalidations()
# Processes invalidations that may have come in from other
# transactions.
Participants:
T: ITransaction
o1, o2, o3: some persistent objects
C1, C2, C3: resource managers
S1, S2: Transaction savepoint objects
s11, s21, s22: resource-manager savepoints
Scenario
"""Rollback of a savepoint"""
create T
o1.modify()
C1.regisiter(o1)
T.join(C1)
T.savepoint()
C1.savepoint()
return s11
return S1 = Savepoint(T, [r11])
o1.modify()
C1.regisiter(o1)
o2.modify()
C2.regisiter(o2)
T.join(C2)
T.savepoint()
C1.savepoint()
return s21
C2.savepoint()
return s22
return S2 = Savepoint(T, [r21, r22])
o3.modify()
C3.regisiter(o3)
T.join(C3)
S1.rollback()
S2.rollback()
T.discard()
C1.discard()
C2.discard()
C3.discard()
o3.invalidate()
S2.discard()
s21.discard() # roll back changes since previous, which is r11
C1.discard(s21)
o1.invalidate()
# truncates temporary storage to s21's position
s22.discard() # roll back changes since previous, which is r11
C1.discard(s22)
o2.invalidate()
# truncates temporary storage to beginning, because
# s22 was the first savepoint. (Perhaps conection
# savepoints record the log position before the
# data were written, which is 0 in this case.
T.commit()
C1.beforeCompletion(T)
C2.beforeCompletion(T)
C3.beforeCompletion(T)
C1.tpc_begin(T)
S1.tpc_begin(T)
C2.tpc_begin(T)
C3.tpc_begin(T)
C1.commit(T)
S1.store(1, ..., T)
C2.commit(T)
C3.commit(T)
C1.tpc_vote(T)
S1.tpc_vote(T)
C2.tpc_vote(T)
C3.tpc_vote(T)
C1.tpc_finish(T)
S1.tpc_finish(T, f) # f is a callback function, which arranges
c# to call DB.invalidate (next)
DB.invalidate(tid, {1: 1}, C)
TM.free(T)
C1.afterCompletion(T)
C1._flush_invalidations()
C2.afterCompletion(T)
C2._flush_invalidations()
C3.afterCompletion(T)
C3._flush_invalidations()
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