On Tue, 2015-12-15 at 16:41 +0000, Ian Jackson wrote: > Ian Campbell writes ("Re: [OSSTEST PATCH 1/4] Database locking: Perl: > Retry all deadlocks in PostgreSQL"): > > On Tue, 2015-12-15 at 16:26 +0000, Ian Jackson wrote: > > > +sub need_retry ($$$) { > > > + my ($jd, $dbh,$committing) = @_; > > > + return > > > + $dbh_tests->err()==7 && > > > + ($dbh_tests->state =~ m/^40P01/); # DEADLOCK DETECTED > > > > How come this return value doesn't need to include $committing in some > > way? > > $committing is just there as a fudge for the benefit of SQLite3, which > only fails during COMMIT. In PostgreSQL we can always tell by the > error code.
But the above doesn't check for the commit failed/conflict code either. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel