This release fixes unexpected behaviors when we are cancelling a batch that has continuations for its inner items as in the following sample. When those continuations have continuations themselves, or when we attaching a job with continuation to a cancelled batch, our leaf-level continuations stuck in the awaiting or non-initialized state until queued manually.
Sounds a bit crazy, but here’s an example:
var batchId = BatchJob.StartNew(batch => { batch.Enqueue(() => LongRunning()); });
string jobId = null;
BatchJob.AwaitBatch(batchId, batch => { jobId = batch.Enqueue(() => LongRunning()); });
// This batch will be always in the awaiting state before the fix
BatchJob.AwaitJob(jobId, batch => batch.Enqueue(() => LongRunning()));
BatchJob.Cancel(batchId);
- Fixed – Continuation stuck in a non-initialized state, when parent batch of antecedent item is canceled.
-
Fixed – Leaks in the
Set
table when cancelling a batch that has continuations for its jobs.