This replaces commit f14a6e997629 which wasn't the right fix for the
same problem.
Details
F5 in a large folder in kmail, then pressing the Abort button
in the middle of the sync. It used to just block the sync, while now it's
possible to resume afterwards.
Diff Detail
- Branch
- transaction_stuff
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 9590 Build 9608: arc lint + arc unit
You say it /replaces/ the faulty commit, but the code introduced in that commit wasn't actually touched here. Are you going to revert the other one and apply this one?
Never mind, I got confused by the diffs (and the commit message) - the code from the referenced commit is actually removed in D19487 :) Maybe squash both changes into one?
Looking at this more closely, I see that canceling works because.. the resource crashes.
I'll need to spend more time on this, starting with writing a unittest for rollingback an ItemSync.
src/core/jobs/transactionsequence.cpp | ||
---|---|---|
243 | So why not kill the subjobs quietly? Since we are cancelling them, we don't care about their result, right? |
src/core/jobs/transactionsequence.cpp | ||
---|---|---|
243 | That's one of the things I tried, and it means mPendingJobs isn't decremented in ItemSync so the itemsync never finishes. (of course Quietly also requires calling KCompositeJob::removeSubjob(job) here in the loop, to avoid keeping dangling jobs in subjobs(), but that's the easy part) |
Dan, do you want to review the updated version? The phabricator status is incorrect, this version hasn't been reviewed.