Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DB-1004 : storage/tokudb/ha_tokudb.cc:315 release: Assertion `Handler… #695

Merged
merged 1 commit into from
Jul 22, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions storage/tokudb/tokudb_background.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ void job_manager_t::destroy() {
while (_background_jobs.size()) {
_mutex.lock();
job_t* job = _background_jobs.front();
cancel(job);
if (!job->cancelled())
cancel(job);
_background_jobs.pop_front();
delete job;
_mutex.unlock();
Expand Down Expand Up @@ -148,11 +149,8 @@ bool job_manager_t::cancel_job(const char* key) {
it != _background_jobs.end(); it++) {
job_t* job = *it;

if (!job->cancelled() &&
strcmp(job->key(), key) == 0) {

if (!job->cancelled() && strcmp(job->key(), key) == 0) {
cancel(job);

ret = true;
}
}
Expand Down Expand Up @@ -233,6 +231,7 @@ void job_manager_t::run(job_t* job) {
}
void job_manager_t::cancel(job_t* job) {
assert_debug(_mutex.is_owned_by_me());
assert_always(!job->cancelled());
job->cancel();
}
job_manager_t* _job_manager = NULL;
Expand Down