Skip to content

Commit 6fc1a4f

Browse files
Chun Nisunshine-Chun
authored andcommitted
[mysql-5.6][PR] MyRocks clone: add missing donor mutex unlocks on error exits
Summary: Pull Request resolved: #1317 GitHub Author: Laurynas Biveinis <laurynas.biveinis@gmail.com> Test Plan: Imported from GitHub, without a `Test Plan:` line. Reviewers: herman Reviewed By: herman Subscribers: webscalesql-eng@fb.com Differential Revision: https://phabricator.intern.facebook.com/D46564079 Tags: accept2ship
1 parent 3332363 commit 6fc1a4f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

storage/rocksdb/clone/donor.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,10 @@ int donor::copy(const THD *thd, uint task_id, Ha_clone_cbk &cbk) {
917917
}
918918

919919
err = handle_any_error(thd);
920-
if (err != 0) return err;
920+
if (err != 0) {
921+
mysql_mutex_unlock(&m_donor_mutex);
922+
return err;
923+
}
921924

922925
if (should_roll_checkpoint()) {
923926
std::size_t checkpoint_size_delta;

0 commit comments

Comments
 (0)