Misc. small cleanups unrelated to any particular MDEV
Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
This commit is contained in:
parent
23d53913fb
commit
b4646c675c
@ -7587,7 +7587,7 @@ MYSQL_BIN_LOG::queue_for_group_commit(group_commit_entry *orig_entry)
|
|||||||
|
|
||||||
Setting this flag may or may not be seen by the other thread, but we
|
Setting this flag may or may not be seen by the other thread, but we
|
||||||
are safe in any case: The other thread will set queued_by_other under
|
are safe in any case: The other thread will set queued_by_other under
|
||||||
its LOCK_wait_commit, and we will not check queued_by_other only after
|
its LOCK_wait_commit, and we will not check queued_by_other until after
|
||||||
we have been woken up.
|
we have been woken up.
|
||||||
*/
|
*/
|
||||||
wfc->opaque_pointer= orig_entry;
|
wfc->opaque_pointer= orig_entry;
|
||||||
@ -7684,7 +7684,7 @@ MYSQL_BIN_LOG::queue_for_group_commit(group_commit_entry *orig_entry)
|
|||||||
is pointed to by `last` (we do not use NULL to terminate the list).
|
is pointed to by `last` (we do not use NULL to terminate the list).
|
||||||
|
|
||||||
As we process an entry, any waiters for that entry are added at the end of
|
As we process an entry, any waiters for that entry are added at the end of
|
||||||
the list, to be processed in subsequent iterations. The the entry is added
|
the list, to be processed in subsequent iterations. Then the entry is added
|
||||||
to the group_commit_queue. This continues until the list is exhausted,
|
to the group_commit_queue. This continues until the list is exhausted,
|
||||||
with all entries ever added eventually processed.
|
with all entries ever added eventually processed.
|
||||||
|
|
||||||
|
@ -7643,7 +7643,7 @@ wait_for_commit::wait_for_prior_commit2(THD *thd)
|
|||||||
{
|
{
|
||||||
PSI_stage_info old_stage;
|
PSI_stage_info old_stage;
|
||||||
wait_for_commit *loc_waitee;
|
wait_for_commit *loc_waitee;
|
||||||
bool backup_lock_released= 0;
|
bool backup_lock_released= false;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Release MDL_BACKUP_COMMIT LOCK while waiting for other threads to commit
|
Release MDL_BACKUP_COMMIT LOCK while waiting for other threads to commit
|
||||||
@ -7653,7 +7653,7 @@ wait_for_commit::wait_for_prior_commit2(THD *thd)
|
|||||||
*/
|
*/
|
||||||
if (thd->backup_commit_lock && thd->backup_commit_lock->ticket)
|
if (thd->backup_commit_lock && thd->backup_commit_lock->ticket)
|
||||||
{
|
{
|
||||||
backup_lock_released= 1;
|
backup_lock_released= true;
|
||||||
thd->mdl_context.release_lock(thd->backup_commit_lock->ticket);
|
thd->mdl_context.release_lock(thd->backup_commit_lock->ticket);
|
||||||
thd->backup_commit_lock->ticket= 0;
|
thd->backup_commit_lock->ticket= 0;
|
||||||
}
|
}
|
||||||
@ -7706,14 +7706,14 @@ wait_for_commit::wait_for_prior_commit2(THD *thd)
|
|||||||
use within enter_cond/exit_cond.
|
use within enter_cond/exit_cond.
|
||||||
*/
|
*/
|
||||||
DEBUG_SYNC(thd, "wait_for_prior_commit_killed");
|
DEBUG_SYNC(thd, "wait_for_prior_commit_killed");
|
||||||
if (backup_lock_released)
|
if (unlikely(backup_lock_released))
|
||||||
thd->mdl_context.acquire_lock(thd->backup_commit_lock,
|
thd->mdl_context.acquire_lock(thd->backup_commit_lock,
|
||||||
thd->variables.lock_wait_timeout);
|
thd->variables.lock_wait_timeout);
|
||||||
return wakeup_error;
|
return wakeup_error;
|
||||||
|
|
||||||
end:
|
end:
|
||||||
thd->EXIT_COND(&old_stage);
|
thd->EXIT_COND(&old_stage);
|
||||||
if (backup_lock_released)
|
if (unlikely(backup_lock_released))
|
||||||
thd->mdl_context.acquire_lock(thd->backup_commit_lock,
|
thd->mdl_context.acquire_lock(thd->backup_commit_lock,
|
||||||
thd->variables.lock_wait_timeout);
|
thd->variables.lock_wait_timeout);
|
||||||
return wakeup_error;
|
return wakeup_error;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user