// will not be persisted.
if writeErr == nil || !persistence.OperationPossiblySucceeded(writeErr) {
// we can only remove the task from the pending task list if we are sure it was inserted
task_request_tracker.go
// or the insertion is guaranteed to have failed
for category, minKey := range minKeyByCategory {
delete(t.pendingTaskKeys[category], minKey)
}