Commit a91d6f6
mdbmes
CDRIVER-4500: SDAM structured log and unified test support (#1842)
* Resolves CDRIVER-4500 (SDAM structured logs + updated unified tests)
* Resolves CDRIVER-4758 (Prose test for heartbeat event order: /server_discovery_and_monitoring/prose/heartbeat)
* Resolves CDRIVER-4137 (Missing server close events, now tested by /server_discovery_and_monitoring/unified)
* Completes outstanding issues in the CDRIVER-3775 epic (libmongoc structured logging)
Details:
* Synchronized SDAM spec tests from the specifications repository, commit d795d493c41022cb8ed15006ae5ac5ad85936f40
* Added /server_discovery_and_monitoring/unified tests
* Refactoring: new log-and-monitor type for apm monitoring state plus structured log instance
* Implemented SDAM log messages for topology changes and monitoring lifecycle
* Fixes for lifecycle events generated for Structured Log and APM consumers:
* ServerOpeningEvent is deferred based on topology 'opening' state, not based on when callbacks are installed.
* Required ServerClosedEvent and topology Unknown state changes are emitted prior to TopologyClosedEvent.
* New Structured Log items:
* oid() for a plain ObjectID without hex representation
* topology_description_as_json() for plain topology descriptions not inside a topology
* Added test skips for SDAM unified tests that require pool support, driver-generated connection IDs, thread entities.
* Test skips for CDRIVER-5870 (Spec compliant response to authentication errors)
* Additional debug output from loadbalancer tests
* CDRIVER-4758: added /server_discovery_and_monitoring/prose/heartbeat
* Unified test runner changes
* Error instead of segfault when checking events/logs on missing client entity
* Support for "closing" some entity types without deleting (For example, to inspect events logged when closing a client)
* Added debug logging about log suppression
* Added per-entity structured log filter stack (entity_map_log_filter_push/pop) used internally to refine the apparent behavior of waitForEvent
* Added SDAM APM events, and a suitable eventType filtering implementation.
* New operations: assertEventCount, recordTopologyDescription, assertTopologyType, waitForPrimaryChange
* entity-map: pass server monitoring mode URI option
* runCommand should report reply as result for matching
* waitForEvent: do an entire stream-selection, to advance blocking topology scans
* Fix entity-map destructor for findcursor without cursor1 parent 2a35499 commit a91d6f6
File tree
167 files changed
+11432
-1505
lines changed- src/libmongoc
- src/mongoc
- tests
- json/server_discovery_and_monitoring
- errors
- monitoring
- rs
- sharded
- single
- unified
- unified
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
167 files changed
+11432
-1505
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
4 | 10 | | |
5 | 11 | | |
6 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
623 | 623 | | |
624 | 624 | | |
625 | 625 | | |
| 626 | + | |
626 | 627 | | |
627 | 628 | | |
628 | 629 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
57 | | - | |
58 | | - | |
59 | 58 | | |
60 | 59 | | |
61 | 60 | | |
| |||
283 | 282 | | |
284 | 283 | | |
285 | 284 | | |
286 | | - | |
287 | 285 | | |
288 | 286 | | |
289 | 287 | | |
| |||
577 | 575 | | |
578 | 576 | | |
579 | 577 | | |
| 578 | + | |
| 579 | + | |
580 | 580 | | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
| 581 | + | |
585 | 582 | | |
586 | | - | |
587 | | - | |
| 583 | + | |
588 | 584 | | |
589 | | - | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
590 | 593 | | |
591 | | - | |
592 | | - | |
593 | | - | |
594 | 594 | | |
595 | | - | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
596 | 599 | | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | 600 | | |
610 | 601 | | |
611 | 602 | | |
| |||
618 | 609 | | |
619 | 610 | | |
620 | 611 | | |
621 | | - | |
| 612 | + | |
622 | 613 | | |
623 | 614 | | |
624 | | - | |
| 615 | + | |
625 | 616 | | |
626 | 617 | | |
627 | 618 | | |
628 | | - | |
| 619 | + | |
629 | 620 | | |
630 | 621 | | |
631 | 622 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | 110 | | |
114 | 111 | | |
115 | 112 | | |
| |||
151 | 148 | | |
152 | 149 | | |
153 | 150 | | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | 151 | | |
158 | 152 | | |
159 | 153 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1122 | 1122 | | |
1123 | 1123 | | |
1124 | 1124 | | |
1125 | | - | |
| 1125 | + | |
1126 | 1126 | | |
1127 | 1127 | | |
1128 | 1128 | | |
| |||
1646 | 1646 | | |
1647 | 1647 | | |
1648 | 1648 | | |
1649 | | - | |
1650 | | - | |
1651 | 1649 | | |
1652 | 1650 | | |
1653 | 1651 | | |
| |||
1667 | 1665 | | |
1668 | 1666 | | |
1669 | 1667 | | |
1670 | | - | |
1671 | | - | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
1672 | 1675 | | |
1673 | 1676 | | |
1674 | 1677 | | |
| |||
2165 | 2168 | | |
2166 | 2169 | | |
2167 | 2170 | | |
2168 | | - | |
2169 | 2171 | | |
2170 | 2172 | | |
2171 | 2173 | | |
2172 | 2174 | | |
2173 | | - | |
| 2175 | + | |
| 2176 | + | |
2174 | 2177 | | |
2175 | | - | |
| 2178 | + | |
2176 | 2179 | | |
2177 | 2180 | | |
2178 | 2181 | | |
| |||
2189 | 2192 | | |
2190 | 2193 | | |
2191 | 2194 | | |
2192 | | - | |
| 2195 | + | |
2193 | 2196 | | |
2194 | | - | |
| 2197 | + | |
2195 | 2198 | | |
2196 | 2199 | | |
2197 | 2200 | | |
| |||
2207 | 2210 | | |
2208 | 2211 | | |
2209 | 2212 | | |
2210 | | - | |
2211 | 2213 | | |
2212 | 2214 | | |
2213 | 2215 | | |
2214 | 2216 | | |
2215 | 2217 | | |
2216 | 2218 | | |
2217 | | - | |
| 2219 | + | |
| 2220 | + | |
2218 | 2221 | | |
2219 | | - | |
| 2222 | + | |
2220 | 2223 | | |
2221 | 2224 | | |
2222 | 2225 | | |
| |||
2239 | 2242 | | |
2240 | 2243 | | |
2241 | 2244 | | |
2242 | | - | |
| 2245 | + | |
2243 | 2246 | | |
2244 | | - | |
| 2247 | + | |
2245 | 2248 | | |
2246 | 2249 | | |
2247 | 2250 | | |
| |||
2256 | 2259 | | |
2257 | 2260 | | |
2258 | 2261 | | |
2259 | | - | |
2260 | 2262 | | |
2261 | 2263 | | |
2262 | 2264 | | |
2263 | 2265 | | |
2264 | 2266 | | |
2265 | | - | |
| 2267 | + | |
| 2268 | + | |
2266 | 2269 | | |
2267 | | - | |
| 2270 | + | |
2268 | 2271 | | |
2269 | 2272 | | |
2270 | 2273 | | |
| |||
2285 | 2288 | | |
2286 | 2289 | | |
2287 | 2290 | | |
2288 | | - | |
| 2291 | + | |
2289 | 2292 | | |
2290 | | - | |
| 2293 | + | |
2291 | 2294 | | |
2292 | 2295 | | |
2293 | 2296 | | |
| |||
2576 | 2579 | | |
2577 | 2580 | | |
2578 | 2581 | | |
2579 | | - | |
2580 | | - | |
2581 | | - | |
2582 | | - | |
2583 | | - | |
2584 | | - | |
2585 | | - | |
2586 | | - | |
2587 | | - | |
2588 | | - | |
2589 | | - | |
2590 | | - | |
2591 | | - | |
2592 | | - | |
2593 | | - | |
2594 | | - | |
2595 | | - | |
2596 | | - | |
2597 | | - | |
2598 | | - | |
2599 | | - | |
2600 | | - | |
2601 | | - | |
2602 | | - | |
2603 | | - | |
2604 | | - | |
2605 | | - | |
2606 | 2582 | | |
2607 | 2583 | | |
2608 | 2584 | | |
| |||
2614 | 2590 | | |
2615 | 2591 | | |
2616 | 2592 | | |
2617 | | - | |
| 2593 | + | |
| 2594 | + | |
| 2595 | + | |
2618 | 2596 | | |
2619 | 2597 | | |
2620 | 2598 | | |
| |||
2625 | 2603 | | |
2626 | 2604 | | |
2627 | 2605 | | |
2628 | | - | |
| 2606 | + | |
2629 | 2607 | | |
2630 | 2608 | | |
2631 | 2609 | | |
| |||
0 commit comments