-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
8
-
StorEng - Defined Pipeline
Dedicated testing for hazard pointers is currently limited. This ticket will add unit tests for the hazard pointer logic. These tests only need to cover functional behaviour, and don't need to think about races between threads that modify hazard pointers.
(Some of) the behaviour to be covered includes:
- Inserting a new hazard pointer (hazard_set_func)
- When no previous hazard pointer is present for the page
- When the session already holds a hazard pointer for the page
- Removing a hazard pointer (hazard_clear)
- When the session has that hazard pointer
- When the session does not have that hazard pointer already
- Verifying that hazard_check
- Finds hazard pointers when they are present
- Does not find hazard pointers when they aren't present
- That the above behaviour works across multiple sessions
- That hazard_count returns the correct result for varying numbers of hazard pointers
This process may also require exposing the relevant functions to the unit testing framework when the HAVE_UNITTEST compile flag is set.
- related to
-
WT-11894 Review hazard pointer release implementation
- Closed