storage/tokudb/ha_tokudb.cc:315 release: Assertion `Handlerton: _use_count != 0 ' failed (errno=0)
Description
Tokudb handlerton _use_count inaccurate on server shutdown due to double cancel of background job.
Forwarded by Rich Prohaska from https://jira.mariadb.org/browse/MDEV-10327
here is the sequence of operations
job is created.
job is queued to run on background.
before the job runs, it is cancelled. the state of the job is cancelled AND it is still on the background job queue.
the tokudb handlerton is shutdown. the job manager is destroyed. all of the queued jobs are cancelled. the job that was previously cancelled is cancelled AGAIN.
Environment
Activity
https://github.com/georgelorchpercona/percona-server/tree/ps-5.6-DB-1004
http://jenkins.percona.com/view/PS%205.6/job/percona-server-5.6-param/1249/
https://github.com/percona/percona-server/pull/695
https://github.com/georgelorchpercona/percona-server/tree/ps-5.7-DB-1004
http://jenkins.percona.com/view/5.7/job/mysql-5.7-param/263/
https://github.com/percona/percona-server/pull/696