Details
-
Type:
Task
-
Status: Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
Trim THD by moving out fields specific to system threads
The class THD has a number of fields that are used only in special system
threads (eg. replication SQL/worker threads), yet take up space (and CPU
cache) for all threads.
We should intruduce a THD::system_thread_info, which is a union of pointers to
different structures used in different system threads. So that only a single
pointer needs to be added to the THD to be able to handle all extra
information needed by any special-purpose thread:
union {
rpl_io_thread_info *rpl_io_info;
rpl_sql_thread_info *rpl_sql_info;
// ...
} system_thread_info;
Non-exhaustive list of candidates to be moved into this union:
- rpl_filter
- rgi_slave
- is_slave_error
- slave_expected_error
- slave_net
In addition, it should be enough to have a single field,
eg. THD::system_thread, that identifies the different system threads and thus
which of the pointers in the system_thread_info union are valid. This should
replace fields such as THD::slave_thread.
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions