Re: Avoid stuck of pbgench due to skipped transactions

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: Avoid stuck of pbgench due to skipped transactions
Дата
Msg-id alpine.DEB.2.22.394.2106122339210.479449@pseudo
обсуждение исходный текст
Ответ на Avoid stuck of pbgench due to skipped transactions  (Yugo NAGATA <nagata@sraoss.co.jp>)
Ответы Re: Avoid stuck of pbgench due to skipped transactions  (Yugo NAGATA <nagata@sraoss.co.jp>)
Список pgsql-hackers
Hello Yugo-san,

> For example, when I usee a large rate (-R) for throttling and a
> small latency limit (-L) values with a duration (-T), pbbench
> got stuck.
>
> $ pgbench -T 5 -R 100000000 -L 1;

Indeed, it does not get out of the catchup loop for a long time because 
even scheduling takes more time than the expected transaction time!

> I think it is better to check the timer expiration even in the loop
> of transaction skips and to finish pgbnech successfully because we
> should correcly repport how many transactions are proccessed and
> skipped also in this case, and getting stuck would not be good
> anyway.
>
> I attached a patch for this fix.

The patch mostly works for me, and I agree that the bench should not be in 
a loop on any parameters, even when "crazy" parameters are given…

However I'm not sure this is the right way to handle this issue.

The catch-up loop can be dropped and the automaton can loop over itself to 
reschedule. Doing that as the attached fixes this issue and also makes 
progress reporting work proprely in more cases, and reduces the number of 
lines of code. I did not add a test case because time sensitive tests have 
been removed (which is too bad, IMHO).

-- 
Fabien.
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Geoff Winkless
Дата:
Сообщение: Re: "an SQL" vs. "a SQL"
Следующее
От: Noah Misch
Дата:
Сообщение: Re: Continuing instability in insert-conflict-specconflict test