-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Storage Execution
-
Fully Compatible
-
Execution Team 2024-08-05, Execution Team 2024-08-19, Execution Team 2024-09-16, Execution Team 2024-09-30, Execution Team 2024-10-14, Execution Team 2024-10-28, Execution Team 2024-11-11
Pre-image testing should be modularized. Much of it can be pushed to the unittest level, to prevent non-deterministic test failures and better documentation of expected behavior.
For example, change_stream_pre_images_server_stats.js asserts that the statistics 'docsDeleted' should reflect the actual number of documents removed. However, if the truncate markers incorrectly track the number of documents covered by a marker, these statistics can be incorrect. This is expected, especially near the time of truncate marker initialization, when we trade accuracy for speed.
In addition, we have two files of 'unittests' for pre-image truncate removal. change_stream_pre_images_remover_test.cpp and change_stream_pre_images_truncate_manager_test.cpp. Both files overlap in what they test.
There is significant room for improving test coverage and the testing approach with the pre-image removal.