[MDEV-15983] Reduce fil_system.mutex contention further Created: 2018-04-23 Updated: 2020-09-22 Resolved: 2018-04-23 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.3 |
| Fix Version/s: | 10.3.7 |
| Type: | Bug | Priority: | Major |
| Reporter: | Marko Mäkelä | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | encryption, performance | ||
| Environment: |
Debian GNU/Linux unstable AMD64 (gcc 8.0.1) |
||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Description |
|
The test encryption.innodb-missing-key occasionally fails due to an apparent race condition when fil_space_release() is being invoked:
This looks like a false alarm, because the supposedly wrong access occurs inside the memory that was allocated from the stack for the constructor call Context::Context(). The class Context derives from latch_t. The failure looks similar to the one that was reported in
In any case, there is no need to acquire fil_system.mutex for decrementing a reference count. Let us use atomic memory access for fil_space_t::n_pending_ops and fil_space_t::n_pending_ios. |