|
[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: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?
Also, "DEADLOCK DETECTED" presumably only occurs when fighting with some
other client, as opposed to this client being broken and doing "LOCK A;
....; LOCK A"? Or if not we have a retry limit so such code won't just spin
forever.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |