Commit 1da9c4d
authored
Improve activity log throttling check (#34244)
Rather than throttle on the first Prepare+Bind+Execution execution, we
throttle on all statement executions similar to the sampling check. Key
differences being:
- `throttled_count` column is no longer the number of unique prepared
statements throttled before it. It now includes all throttled statement
executions too (i.e. multiple Executes of a prepared statement).
See commit messages for details.
<!--
Describe the contents of the PR briefly but completely.
If you write detailed commit messages, it is acceptable to copy/paste
them
here, or write "see commit messages for details." If there is only one
commit
in the PR, GitHub will have already added its commit message above.
-->
### Motivation
* This PR fixes a recognized bug.
- [ ] MaterializeInc/database-issues#9922
- [ ] MaterializeInc/database-issues#9604
<!--
Which of the following best describes the motivation behind this PR?
[Ensure issue is linked somewhere.]
* This PR adds a known-desirable feature.
[Ensure issue is linked somewhere.]
* This PR fixes a previously unreported bug.
[Describe the bug in detail, as if you were filing a bug report.]
* This PR adds a feature that has not yet been specified.
[Write a brief specification for the feature, including justification
for its inclusion in Materialize, as if you were writing the original
feature specification.]
* This PR refactors existing code.
[Describe what was wrong with the existing code, if it is not obvious.]
-->
### Tips for reviewer
<!--
Leave some tips for your reviewer, like:
* The diff is much smaller if viewed with whitespace hidden.
* [Some function/module/file] deserves extra attention.
* [Some function/module/file] is pure code movement and only needs a
skim.
Delete this section if no tips.
-->
### Checklist
- [ ] This PR has adequate test coverage / QA involvement has been duly
considered. ([trigger-ci for additional test/nightly
runs](https://trigger-ci.dev.materialize.com/))
- [ ] This PR has an associated up-to-date [design
doc](https://github.com/MaterializeInc/materialize/blob/main/doc/developer/design/README.md),
is a design doc
([template](https://github.com/MaterializeInc/materialize/blob/main/doc/developer/design/00000000_template.md)),
or is sufficiently small to not require a design.
<!-- Reference the design in the description. -->
- [ ] If this PR evolves [an existing `$T ⇔ Proto$T`
mapping](https://github.com/MaterializeInc/materialize/blob/main/doc/developer/command-and-response-binary-encoding.md)
(possibly in a backwards-incompatible way), then it is tagged with a
`T-proto` label.
- [ ] If this PR will require changes to cloud orchestration or tests,
there is a companion cloud PR to account for those changes that is
tagged with the release-blocker label
([example](MaterializeInc/cloud#5021)).
<!-- Ask in #team-cloud on Slack if you need help preparing the cloud
PR. -->
- [ ] If this PR includes major [user-facing behavior
changes](https://github.com/MaterializeInc/materialize/blob/main/doc/developer/guide-changes.md#what-changes-require-a-release-note),
I have pinged the relevant PM to schedule a changelog post.1 parent 70852b4 commit 1da9c4d
File tree
5 files changed
+169
-67
lines changed- doc/user/content/sql/system-catalog
- src
- adapter/src
- coord
- environmentd/tests
- test/sqllogictest/autogenerated
5 files changed
+169
-67
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
726 | 726 | | |
727 | 727 | | |
728 | 728 | | |
729 | | - | |
| 729 | + | |
730 | 730 | | |
731 | 731 | | |
732 | 732 | | |
733 | 733 | | |
734 | 734 | | |
735 | | - | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
736 | 742 | | |
| 743 | + | |
737 | 744 | | |
738 | 745 | | |
739 | 746 | | |
740 | 747 | | |
741 | | - | |
| 748 | + | |
742 | 749 | | |
743 | | - | |
744 | 750 | | |
745 | 751 | | |
746 | 752 | | |
| |||
1338 | 1344 | | |
1339 | 1345 | | |
1340 | 1346 | | |
1341 | | - | |
1342 | 1347 | | |
1343 | 1348 | | |
1344 | 1349 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | | - | |
| 181 | + | |
182 | 182 | | |
183 | | - | |
184 | | - | |
| 183 | + | |
185 | 184 | | |
186 | 185 | | |
187 | 186 | | |
188 | 187 | | |
189 | 188 | | |
190 | | - | |
| 189 | + | |
191 | 190 | | |
192 | 191 | | |
193 | 192 | | |
| |||
202 | 201 | | |
203 | 202 | | |
204 | 203 | | |
205 | | - | |
| 204 | + | |
206 | 205 | | |
207 | 206 | | |
208 | 207 | | |
209 | 208 | | |
210 | 209 | | |
211 | | - | |
212 | | - | |
| 210 | + | |
213 | 211 | | |
214 | 212 | | |
215 | 213 | | |
| |||
276 | 274 | | |
277 | 275 | | |
278 | 276 | | |
279 | | - | |
280 | | - | |
281 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
282 | 290 | | |
283 | 291 | | |
284 | 292 | | |
285 | 293 | | |
286 | 294 | | |
287 | | - | |
| 295 | + | |
288 | 296 | | |
289 | 297 | | |
290 | 298 | | |
| |||
297 | 305 | | |
298 | 306 | | |
299 | 307 | | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
300 | 322 | | |
301 | 323 | | |
302 | 324 | | |
303 | 325 | | |
304 | 326 | | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
309 | 336 | | |
310 | | - | |
| 337 | + | |
311 | 338 | | |
312 | 339 | | |
313 | | - | |
314 | | - | |
315 | | - | |
| 340 | + | |
| 341 | + | |
316 | 342 | | |
317 | | - | |
318 | | - | |
| 343 | + | |
| 344 | + | |
319 | 345 | | |
320 | 346 | | |
321 | 347 | | |
| |||
331 | 357 | | |
332 | 358 | | |
333 | 359 | | |
334 | | - | |
335 | | - | |
336 | 360 | | |
337 | 361 | | |
338 | 362 | | |
339 | 363 | | |
340 | | - | |
| 364 | + | |
341 | 365 | | |
342 | 366 | | |
343 | 367 | | |
| |||
357 | 381 | | |
358 | 382 | | |
359 | 383 | | |
360 | | - | |
361 | | - | |
| 384 | + | |
362 | 385 | | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | 386 | | |
371 | | - | |
372 | | - | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
373 | 397 | | |
374 | | - | |
375 | | - | |
| 398 | + | |
376 | 399 | | |
377 | 400 | | |
378 | 401 | | |
| |||
700 | 723 | | |
701 | 724 | | |
702 | 725 | | |
| 726 | + | |
| 727 | + | |
703 | 728 | | |
704 | 729 | | |
705 | 730 | | |
| |||
728 | 753 | | |
729 | 754 | | |
730 | 755 | | |
731 | | - | |
| 756 | + | |
| 757 | + | |
732 | 758 | | |
733 | 759 | | |
734 | 760 | | |
| |||
737 | 763 | | |
738 | 764 | | |
739 | 765 | | |
740 | | - | |
741 | | - | |
742 | | - | |
743 | | - | |
744 | | - | |
745 | 766 | | |
746 | 767 | | |
747 | 768 | | |
| |||
786 | 807 | | |
787 | 808 | | |
788 | 809 | | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
789 | 856 | | |
790 | 857 | | |
791 | 858 | | |
792 | 859 | | |
793 | 860 | | |
794 | 861 | | |
795 | | - | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
796 | 871 | | |
797 | 872 | | |
798 | | - | |
799 | | - | |
800 | | - | |
801 | | - | |
802 | | - | |
803 | | - | |
804 | | - | |
805 | | - | |
806 | | - | |
807 | | - | |
808 | | - | |
| 873 | + | |
809 | 874 | | |
810 | 875 | | |
811 | 876 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
272 | 276 | | |
273 | 277 | | |
274 | 278 | | |
| |||
0 commit comments