Re: Re: trellis.Set.discard
"Sergey Schetinin" <[email protected]>
| Newsgroups | gmane.comp.python.peak |
|---|---|
| Message-ID | <[email protected]> |
The undo for tasks runs because Set._data first runs when we create CV object because of .discard in maintain, which also changes .added which Set._data depends on. Later, when processing .writes it is rescheduled due to this dependency. When it runs for the second time it adds savepoint to has_run, but the maintain is scheduled too, because it depends on .v which is also registered in .writes, so when that runs it schedules Set._data again, and that having run already and being registered in has_run it gets added to to_retry, so the savepoint is used. This gets to rollback maintain an .added which uses its original savepoint rolling back the entire thing.