[ANNOUNCE] memcached 1.2.4
Tomash Brechko
tomash.brechko at gmail.com
Fri Dec 7 07:27:06 UTC 2007
On Thu, Dec 06, 2007 at 16:30:44 -0800, dormando wrote:
> > print $sock "cas foo1 0 0 6 $result[0]\r\nbarva2\r\n";
> > print $sock2 "cas foo1 0 0 5 $result2[0]\r\napple\r\n";
> >
> > my $res1 = scalar <$sock>;
> > my $res2 = scalar <$sock2>;
> > ok(($res1 eq "STORED\r\n" and $res2 eq "EXISTS\r\n") or
> > ($res1 eq "EXISTS\r\n" and $res2 eq "STORED\r\n"));
>
> So this is testing ... cas failure?
The test has this comment:
### simulate race condition with cas
As I understand it, it tries to issue two cas updates through
different connections with the same cas value more or less in parallel
(in a sense that they are not ordered wrt each other), and sees that
only one of them succeeds. So it has to get one positive STORED and
one negative EXISTS, but it is undefined which connection would win
the race.
--
Tomash Brechko
More information about the memcached
mailing list