When in the rollback loop, a timer was created, but if the context is finished, then the timer's channel would leak.
In addition, the function said it was doing exponential backoff (presumably from 0 to 512 seconds), but the arguments to the Pow() function were reversed, so it was doing quadratic backoff from 0 to 81 seconds.
Also, there was no test for the rollback function, so one was added.
When in the rollback loop, a timer was created, but if the context is finished, then the timer's channel would leak.
In addition, the function said it was doing exponential backoff (presumably from 0 to 512 seconds), but the arguments to the
Pow()
function were reversed, so it was doing quadratic backoff from 0 to 81 seconds.Also, there was no test for the rollback function, so one was added.