Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-93003

Modularize pre-image truncation testing

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Execution
    • Execution Team 2024-08-05, Execution Team 2024-08-19, Execution Team 2024-09-16, Execution Team 2024-09-30

      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. 

            Assignee:
            haley.connelly@mongodb.com Haley Connelly
            Reporter:
            haley.connelly@mongodb.com Haley Connelly
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: