If there is something fundamentally wrong, don't just sit looping
around every 500ms.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
}
proc transaction {tables script} {
+ global errorInfo errorCode
+ set retries 100
db-open
while 1 {
set ol {}
} emsg]} {
puts "commit failed: $emsg; retrying ..."
db-execute ROLLBACK
+ if {[incr retries -1] <= 0} {
+ error \
+ "commit failed, too many retries: $emsg\n$errorInfo\n$errorCode\n"
+ }
after 500
continue
}