Repository navigation
Commit faeb5bf
committed
fix: surface count()/sum() timeouts and stop clearTimeout leaking on SQL adapters
- Mongo count() swallowed every client exception and returned 0, so a
maxTimeMS expiry never surfaced; rethrow timeouts via processException.
- Mongo sum() threw the raw client exception; route it through
processException so timeouts map to the Timeout exception.
- Remove count()'s dead early $options['limit'] assignment (the limit is
applied via the $limit pipeline stage).
- Adapter::clearTimeout() now resets the timeout property. Postgres applies
the property on every statement (SET statement_timeout), so a cleared
timeout kept cancelling all subsequent heavy statements on the connection.
- Harden testCountTimeout: cleanup in finally, fixture read once, and the
assertion moved out of the catch so a swallowed timeout fails clearly.1 parent a7b99ed commit faeb5bf
3 files changed
Lines changed: 30 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
349 | 349 | | |
350 | 350 | | |
351 | 351 | | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
352 | 357 | | |
353 | 358 | | |
354 | 359 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2712 | 2712 | | |
2713 | 2713 | | |
2714 | 2714 | | |
2715 | | - | |
2716 | | - | |
2717 | | - | |
2718 | | - | |
2719 | | - | |
2720 | 2715 | | |
2721 | 2716 | | |
2722 | 2717 | | |
| |||
2791 | 2786 | | |
2792 | 2787 | | |
2793 | 2788 | | |
| 2789 | + | |
| 2790 | + | |
| 2791 | + | |
| 2792 | + | |
| 2793 | + | |
2794 | 2794 | | |
2795 | 2795 | | |
2796 | 2796 | | |
| |||
2854 | 2854 | | |
2855 | 2855 | | |
2856 | 2856 | | |
2857 | | - | |
| 2857 | + | |
| 2858 | + | |
| 2859 | + | |
| 2860 | + | |
| 2861 | + | |
2858 | 2862 | | |
2859 | 2863 | | |
2860 | 2864 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
112 | 113 | | |
113 | 114 | | |
114 | | - | |
| 115 | + | |
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
| |||
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
123 | | - | |
124 | | - | |
125 | 124 | | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
131 | 138 | | |
132 | 139 | | |
133 | | - | |
134 | 140 | | |
135 | 141 | | |
136 | 142 | | |
| |||
0 commit comments