7 Commits

Author SHA1 Message Date
Niels Thykier
179faeb23b
Update some comments to match a renamed method
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-12-22 21:14:33 +00:00
Niels Thykier
8cefd1a546
Have transactions verify/assert safe usage
Have the transaction code verify that there is at most one active
child at the time and no one is using the parent while child is
active.  This is how the code is intended to be used and also the
code almost certainly does not work otherwise.

The new code does not cover commiting/rolling back a parent before a
child but that is already covered by the existing code (it will
trigger when child transaction is rolled back/committed or when
leaving the contextmanager from start_transaction).

This would have caught 7d758760d1c08bcd3b364f7e6ec76b2c0eafe68a
immediately with an assertion error.

Signed-off-by: Niels Thykier <niels@thykier.net>
2018-12-22 21:12:01 +00:00
Niels Thykier
a5352d353b
Simplify undo code handling sources
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-12-20 20:29:02 +00:00
Niels Thykier
59ae7e3d68
Optimize out "nvirtual" member of undo items
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-12-20 20:29:01 +00:00
Niels Thykier
c7dbd95c0b
Have MigrationManager keep track of active transaction
This leaves callers with only having to track the transaction they
need to care about (if any).

Signed-off-by: Niels Thykier <niels@thykier.net>
2018-12-18 22:08:20 +00:00
Niels Thykier
a05a249e04
Record exactly which binaries are updated in the transaction
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-12-16 20:03:19 +00:00
Niels Thykier
5d49a41204
Introduce a "Transaction" for changes to testing
This isolates the undo handling in the new transaction object and in
doop_source, which currently generates the undo items.  This commit
will be a stepping stone to rewriting the undo handling.

Signed-off-by: Niels Thykier <niels@thykier.net>
2018-12-16 19:58:02 +00:00