qertoip/transaction_retry — pull request #2 by michaelmwu (2013-01-24 23:16:52+00:00)
Title: fuzz factor on delay

Hey,

I don't know if this is the best way to do this, but I've been hitting issues in a heavily trafficked app that launches possibly conflicting transactions at about the same time.

If two conflicting transactions start at the same time and backoff at the same schedule, they are likely to conflict again. I added some fuzz to prevent this from happening, but this might be better done with a customizable function to return the delay vs. how many retries have happened so far, that could default to looking up into an array.