All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: xen-devel@lists.xenproject.org
Subject: Re: [OSSTEST PATCH 1/4] Database locking: Perl: Retry all deadlocks in PostgreSQL
Date: Tue, 15 Dec 2015 16:47:34 +0000	[thread overview]
Message-ID: <1450198054.16856.206.camel@citrix.com> (raw)
In-Reply-To: <22128.17066.190089.78776@mariner.uk.xensource.com>

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

  reply	other threads:[~2015-12-15 16:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-15 16:26 [OSSTEST PATCH 1/4] Database locking: Perl: Retry all deadlocks in PostgreSQL Ian Jackson
2015-12-15 16:26 ` [OSSTEST PATCH 2/4] Database locking: Perl: Increase retry count Ian Jackson
2015-12-15 16:33   ` Ian Campbell
2015-12-15 16:26 ` [OSSTEST PATCH 3/4] Database locking: Tcl: Cover LOCK TABLEs with catch Ian Jackson
2015-12-15 16:34   ` Ian Campbell
2015-12-15 16:26 ` [OSSTEST PATCH 4/4] Database locking: Tcl: Limit number of retries Ian Jackson
2015-12-15 16:35   ` Ian Campbell
2015-12-15 16:33 ` [OSSTEST PATCH 1/4] Database locking: Perl: Retry all deadlocks in PostgreSQL Ian Campbell
2015-12-15 16:41   ` Ian Jackson
2015-12-15 16:47     ` Ian Campbell [this message]
2015-12-15 17:01     ` Ian Jackson
2015-12-15 17:20       ` Ian Jackson
2015-12-16  1:39         ` Robert Hu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1450198054.16856.206.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.