Skip site navigation (1) Skip section navigation (2)

Re: SSI 2PC coverage

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: pgsql-hackers(at)postgresql(dot)org, Dan Ports <drkp(at)csail(dot)mit(dot)edu>
Subject: Re: SSI 2PC coverage
Date: 2011-07-07 15:12:38
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On 05.07.2011 20:06, Kevin Grittner wrote:
> [resending after gzip of test patch]
> In reviewing the recent fix to 2PC coverage in SSI, I found some
> cases which didn't seem to be covered.  Dan bit the bullet and came
> up with an additional isolation test to rigorously cover all the
> permutations, to find *all* 2PC statement orderings which weren't
> working right.  Because it was so big, he pared out tests which were
> redundant, in that they exercised the same code paths and pointed at
> the same issues.  A patch to add this test is attached.  Run against
> HEAD it shows the errors.  It's kinda big, but I think it's worth
> having.

I agree it'd be very nice to have this test, but 2.3 MB of expected 
output is a bit excessive. Let's try to cut that down into something 
more palatable.

There's two expected output files for this, one for max_prepared_xacts=0 
and another for the "normal" case. The max_prepared_xacts=0 case isn't 
very interesting, since all the PREPARE TRANSACTION commands fail. I 
think we should adjust the test harness to not run these tests at all if 
max_prepared_xacts=0. It would be better to skip the test and print out 
a notice pointing out that it was not run, it'll just give a false sense 
of security to run the test and report success, when it didn't test 
anything useful.

That alone cuts the size of the expected output to about 1 MB. That's 
much better, although it's still a lot of weight just for expected 
output. However, it compresses extremely well, to about 16 KB, so this 
isn't an issue for the size of distribution tarballs and such, only for 
git checkouts and on-disk size of extracted tarballs. I think that would 
be acceptable, although we could easily cut it a bit further if we want 
to. For example leaving out the word "step" from all the lines of 
executed test steps would cut it by about 80 KB.

> Attached is also a patch to fix those, so that all permutations
> work.

Thanks, committed the bug fix with some additional comments.

   Heikki Linnakangas

In response to


pgsql-hackers by date

Next:From: Magnus HaganderDate: 2011-07-07 15:12:56
Subject: Re: Moving the community git server
Previous:From: Tom LaneDate: 2011-07-07 15:09:45
Subject: Re: Moving the community git server

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group