FoundationDB/sql-layer — pull request #1205 by MMcM (2014-02-11 02:15:38+00:00)
Title: Redo row reader retry logic

Storage-related errors that might benefit from retry can occur not just from the commit (although that is the most common place). Others are write row, checking the unique constraints before the formal commit, etc.

So, instead of letting the store do commit or retry, catch the error and open a new transaction. Unless the error happened while reading the row, which is unfortunately irrecoverable with the current API. (An auto-increment column might access the store and so fail.)

Also do periodic commit by asking the store whether it is time and then following the same commit path if so.