Re: Potential G2-item cycles under serializable isolation
Kyle Kingsbury <aphyr@jepsen.io>
From: Kyle Kingsbury <aphyr@jepsen.io>
To: Peter Geoghegan <pg@bowt.ie>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2020-06-03T21:34:51Z
Lists: pgsql-bugs
It looks like you're seeing a much higher txn success rate than I
am--possibly due to your tuning? Might be worth adjusting --rate and/or
--concurrency upwards until you see a ~50/50 ratio of successes to
failures. This bug does seem linked to concurrency, so it's possible you're
just not giving it enough concurrent transactions to hit the issue. Or
maybe it's fixed in 13, or a tuning flag addresses it!
On Wed, Jun 3, 2020, 17:22 Peter Geoghegan <pg@bowt.ie> wrote:
> On Wed, Jun 3, 2020 at 1:08 PM Peter Geoghegan <pg@bowt.ie> wrote:
> > I can almost get this to work now. Thank you for accommodating me here.
>
> Actually, I think that this was a simple error on my part. The
> Jepsen/Elle test recipe that Kyle provided now works locally for me.
> The tests actually pass, too -- at least against Postgres 13.
>
> I don't know why Kyle doesn't see the same result. I acknowledge that
> there is likely a bug here that I have yet to reproduce. My guess is
> that it has something to do with the configuration -- though I need to
> test earlier Postgres versions, too (Postgres 12 is what Kyle worked
> against). I'm using a tuned postgresql.conf, whereas Kyle probably
> didn't change many of the defaults.
>
> Here is what I got just now:
>
> pg@bat:~/code/jepsen/stolon$ lein run test-all -w append
> --max-writes-per-key 4 --concurrency 50 -r 500 --isolation
> serializable --time-limit 60 --nemesis none --existing-postgres --node
> localhost --no-ssh --postgres-user jepsen --postgres-password pw
>
> *** SNIP ***
>
> INFO [2020-06-03 14:09:47,978] jepsen worker 33 - jepsen.stolon.append
> :insert [#:next.jdbc{:update-count 1}]
> INFO [2020-06-03 14:09:47,979] jepsen worker 33 - jepsen.util 133 :ok
> :txn [[:r 8408 nil] [:append 8369 1] [:r 8402 [1 2 3]]]
> INFO [2020-06-03 14:09:47,980] jepsen worker 15 - jepsen.util 115
> :invoke :txn [[:append 8412 3]]
> INFO [2020-06-03 14:09:47,981] jepsen worker 15 - jepsen.stolon.append
> :update #:next.jdbc{:update-count 1}
> INFO [2020-06-03 14:09:47,981] jepsen worker 15 - jepsen.util 115 :ok
> :txn [[:append 8412 3]]
> INFO [2020-06-03 14:09:48,012] jepsen test runner - jepsen.core Run
> complete, writing
> INFO [2020-06-03 14:09:48,912] jepsen test runner - jepsen.core
> Analyzing...
> INFO [2020-06-03 14:09:51,415] jepsen test runner - jepsen.core
> Analysis complete
> INFO [2020-06-03 14:09:51,439] jepsen results - jepsen.store Wrote
> /home/pg/code/jepsen/stolon/store/stolon append S (S)
> /20200603T140847.000-0700/results.edn
> INFO [2020-06-03 14:09:52,245] jepsen test runner - jepsen.core {:perf
> {:latency-graph {:valid? true},
> :rate-graph {:valid? true},
> :valid? true},
> :clock {:valid? true},
> :stats
> {:valid? true,
> :count 30096,
> :ok-count 27050,
> :fail-count 2992,
> :info-count 54,
> :by-f
> {:txn
> {:valid? true,
> :count 30096,
> :ok-count 27050,
> :fail-count 2992,
> :info-count 54}}},
> :exceptions {:valid? true},
> :workload {:valid? true},
> :valid? true}
>
>
> Everything looks good! ヽ(‘ー`)ノ
>
>
>
> # Successful tests
>
> store/stolon append S (S) /20200603T140847.000-0700
>
> 1 successes
> 0 unknown
> 0 crashed
> 0 failures
>
> --
> Peter Geoghegan
>
Commits
-
Doc: Add references for SI and SSI.
- 4c897197d793 9.5.23 landed
- 7295ac9c6c71 9.6.19 landed
- e2aca0d02d97 10.14 landed
- 648e56d3984d 11.9 landed
- eb1286413c0a 12.4 landed
- 4701efa9f741 13.0 landed
- 1575fbf1ac3c 14.0 landed
-
Improve comments for [Heap]CheckForSerializableConflictOut().
- 44eff2841059 13.0 landed
- 7aa4fb592530 14.0 landed
-
Avoid update conflict out serialization anomalies.
- 5940ffb22131 14.0 landed
- 6df7105e5d50 13.0 landed
- e620a38c23b9 12.4 landed
- dd616f2ec1c5 11.9 landed
- 19a6e1bc3083 10.14 landed
- e81dc2b7e2c4 9.6.19 landed
- c05f6b354ffe 9.5.23 landed
-
Implement genuine serializable isolation level.
- dafaa3efb75c 9.1.0 cited