Bug #109435 | better to use wdlock for global_sid_lock when only read gtid_state->get_executed | ||
---|---|---|---|
Submitted: | 20 Dec 2022 8:36 | Modified: | 20 Dec 2022 14:13 |
Reporter: | dennis GAO (OCA) | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S5 (Performance) |
Version: | 8.0 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[20 Dec 2022 8:36]
dennis GAO
[20 Dec 2022 14:13]
MySQL Verification Team
Hi Mr. gao, Thank you for your bug report. We totally agree with you. Verified as reported.
[5 Jan 8:10]
huahua xu
Hi Mr. gao, I don't think your improvement is wise, which would Cause some issues. For performance or concurrency, it acquires a rd lock in `global_sid_lock` to add transaction owned GTID into global `executed_gtids` during committing the transaction. Obviously, it will be wrong when reading the executed_gtids with the rd lock in `global_sid_lock`.
[5 Jan 13:01]
MySQL Verification Team
Hi Mr. xu, Thank you for your contribution.