[MDEV-26789] log_write_up_to needs mechanism to prevent stalls of async. waiters Created: 2021-10-08 Updated: 2022-06-09 Resolved: 2021-10-08 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.6 |
| Fix Version/s: | 10.6.8, 10.7.4, 10.8.3, 10.9.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Vladislav Vaintroub | Assignee: | Vladislav Vaintroub |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Since 10.6, the group commit logic in Innodb allows asynchronous waiters. One aspect of group commit lock with that got a little more complicated - passing a group commit "torch" , i.e electing new group commit lead when current one is releasing the lock. In 10.5, group_commit_lock::release would wake up one more waiter than needed, and this woken thread becomes the new group commit lead. in 10.6, group commit lock keeps 1 synchronous waiter (even if the caller was using callback, and intended async execution), as a "standby" , so that waiter can pick the "torch". This is not usually , but not always enough, and there can be pending callbacks in group commit lock, while there is no new lead. To avoid this situation, group_commit_lock::release could tell the caller that some pending work is still there, if there is no new lead. And the caller (log_write_up_to), would redo write/flush one more time. |