Repository navigation
Commit bb372ed
authored
adapter: don't block the Coordinator on cluster status events (#31070)
While investigating some spikes in p99 message duration in the
Coordinator, I noticed that we currently block on a builtin table write
when receiving a status update for a cluster.
This PR refactors the code so we wait for the builtin write to complete
in a `tokio::task`, and then notify sessions.
### Motivation
Improve P99 latencies for Coordinator messages
### Checklist
- [x] 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/))
- [x] 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. -->
- [x] 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.
- [x] 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](https://github.com/MaterializeInc/cloud/pull/5021)).
<!-- Ask in #team-cloud on Slack if you need help preparing the cloud
PR. -->
- [x] 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 0d14e5d commit bb372ed
2 files changed
Lines changed: 37 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3477 | 3477 | | |
3478 | 3478 | | |
3479 | 3479 | | |
| 3480 | + | |
| 3481 | + | |
| 3482 | + | |
| 3483 | + | |
3480 | 3484 | | |
3481 | 3485 | | |
3482 | 3486 | | |
3483 | 3487 | | |
3484 | 3488 | | |
3485 | 3489 | | |
| 3490 | + | |
| 3491 | + | |
| 3492 | + | |
| 3493 | + | |
| 3494 | + | |
| 3495 | + | |
| 3496 | + | |
| 3497 | + | |
| 3498 | + | |
| 3499 | + | |
| 3500 | + | |
| 3501 | + | |
| 3502 | + | |
| 3503 | + | |
| 3504 | + | |
| 3505 | + | |
| 3506 | + | |
3486 | 3507 | | |
3487 | 3508 | | |
3488 | 3509 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
756 | 756 | | |
757 | 757 | | |
758 | 758 | | |
759 | | - | |
760 | | - | |
761 | | - | |
762 | | - | |
763 | | - | |
764 | | - | |
765 | | - | |
| 759 | + | |
| 760 | + | |
766 | 761 | | |
767 | 762 | | |
768 | 763 | | |
| |||
771 | 766 | | |
772 | 767 | | |
773 | 768 | | |
774 | | - | |
| 769 | + | |
| 770 | + | |
775 | 771 | | |
776 | 772 | | |
777 | 773 | | |
778 | 774 | | |
779 | | - | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
780 | 787 | | |
781 | 788 | | |
782 | 789 | | |
| |||
0 commit comments