ExportXMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • DB Integration & Observability
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Problem

      SampleCollectorCacheTestFixture.MultipleCollectors in src/mongo/db/ftdc/collector_test.cpp creates a cache with the fixture's default 200 ms collection timeout, schedules two asynchronous collectors, and immediately asserts that the returned sample contains both collector fields. Under scheduling delays, SampleCollectorCache::refresh can hit the timeout and omit a collector from the sample, causing sample.hasField(kCollectorName) to fail even though the collector callback is correct.

      Evidence

      • Observed in Windows nightly patch #9167, enterprise-windows/unit_tests, in db_ftdc_test.exe.
      • BFG-3627164 records the same MultipleCollectors / 200 ms failure on Linux s390x, so this is not specific to Windows cross compilation.
      • SERVER-134575 is already merged and adds completion waits to other collector tests; it does not update MultipleCollectors. SERVER-105097 and SERVER-102186 are earlier, closed timing-stability fixes.

      Requested change

      Make the test's collector-output assertions independent of a short wall-clock scheduling deadline. Prefer explicit synchronization or controllable time, reusing waitForCollectorToFinish_forTest where appropriate. Preserve coverage that real collection timeouts omit unfinished collectors and permit later collection. Avoid relying solely on a larger timeout or reduced CI concurrency.

      Acceptance criteria

      • Both collector outputs are verified deterministically even when collector execution is delayed.
      • Dedicated timeout and subsequent-refresh behavior remain covered.
      • Validate db_ftdc_test on Windows and Linux at normal CI concurrency.
      • Reassess and remove the temporary windows_timing_sensitive annotation when the executable no longer needs it.

      Temporary mitigation

      PR #67320 tags db_ftdc_test; the runner support in PR #66113 runs tagged executables in a second Windows unit-test invocation with --local_test_jobs=1. This mitigates load sensitivity while the test is corrected.

            Assignee:
            Unassigned
            Reporter:
            Daniel Moody
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: