Details
-
Task
-
Status: In Review (View Workflow)
-
Minor
-
Resolution: Unresolved
Description
Ticket for https://github.com/MariaDB/server/pull/3529 : while MariaDB is written in C+, it rarely uses C+'s advanced features for increased safety. The most important one is RAII, i.e. a single-purpose object manages acquiring and releasing a resource in its constructor/destructor. The destructor is guaranteed to be called, which means the compiler guarantees that the resource gets released when the scope is left, even when an exception is thrown (anywhere, even deeper down the stack). At runtime, this adds no overhead because the RAII object is optimized away.
To get started, I suggest using such a RAII class for the `dict_sys` locks. Part of that was implemented by https://github.com/MariaDB/server/pull/3529
Attachments
Issue Links
- is blocked by
-
MDEV-34988 InnoDB locks dict_sys.latch for a long time during ALTER TABLE
-
- Open
-
-
MDEV-34999 ha_innobase::open() should not acquire dict_sys.latch twice
-
- Open
-
-
MDEV-35000 dict_table_close() breaks innodb_stats_auto_recalc
-
- Closed
-