Bug #97703 innobase/dict: refine dict_temp_file_num with c++11 atomics
Submitted: 20 Nov 2019 9:09 Modified: 17 Feb 2021 11:02
Reporter: Cai Yibo (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S5 (Performance)
Version:8.0 OS:Any
Assigned to: CPU Architecture:ARM
Tags: Contribution

[20 Nov 2019 9:09] Cai Yibo
Description:
This is followup patch of Bug #96504(Refine atomics and barriers for weak memory order platform).
It depends on the patch for Bug #97150.

"dict_temp_file_num" is a counter, only atomicity is required. Current code
uses gcc __sync_xxx builtins which introduces unnecessary memory barriers.

Refine it with C++11 relaxed memory order.

How to repeat:
N/A
[20 Nov 2019 9:10] Cai Yibo
patch

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: 0001-innobase-dict-refine-temp_file_num-with-c-11-atomics.patch (text/x-patch), 2.18 KiB.

[20 Nov 2019 9:57] MySQL Verification Team
Hello Cai Yibo,

Thank you for the report and contribution.

regards,
Umesh
[17 Feb 2021 11:02] Erlend Dahl
[21 Dec 2020 7:44] Daniel T Price

Fixed as of the 8.0.23 release, and here's the proposed changelog
entry from the documentation team:
 
A relaxed memory order was implemented for dictionary memory variable
fetch-add (dict_temp_file_num.fetch_add) and store
(dict_temp_file_num.store) operations.
 
Thanks to Yibo Cai for the contribution.