[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [OSSTEST PATCH 1/4] Database locking: Perl: Retry all deadlocks in PostgreSQL
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@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |