--forced-shutdown does not reflect stuck transactions in stats

Bug #1073672 reported by Alexey Kopytov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
sysbench
Status tracked in Trunk
0.4
Fix Committed
Undecided
Alexey Kopytov
Trunk
Fix Committed
Undecided
Alexey Kopytov

Bug Description

When --forced-shutdown is used, it prints the currently collected statistics and terminates without waiting for worker threads to complete. This was implemented to be able to complete benchmark even if we have some long running or stuck transactions.

The problem is that unfinished transactions are not reflected in statistics. So, for example, if we do have stuck transactions that have been stuck for the entire test duration, their timers will still be running on forced shutdown and thus, statistics will only show transactions performed by other threads, if any.

The fix is stop all timers on forced shutdown, so even stuck transactions are accounted with (forced_shutdown_time - trx_start_time) duration. Also printing the number of currently running transactions at the time of forced shutdown would also make sense.

summary: - --forced-shutdown does not reflect hung transactions in stats
+ --forced-shutdown does not reflect stuck transactions in stats
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.