Commit 1b27969
authored
sui-indexer-alt-framework: fix indexer startup during streaming hang (#26198)
## Description
**Commit 1:**
Adds back #26096 and #26116 which were reverted in #26188.
**Commit 2:**
Specify `timeout` along with `connect_timeout` when creating the gRPC
client.
* `connect_timeout` only bounds the TCP/TLS handshake - the low-level
socket connect. Once the TCP connection is established,
`connect_timeout` has no further effect. The `subscribe_checkpoints` RPC
is a separate HTTP/2 request sent over the already-established
connection, so it's not covered by that setting. If a server accepts
TCP, but stalls before sending response headers, the client hangs the
indefinitely.
* `timeout` is the counterpart that bounds individual RPC calls on the
channel.
**Commit 3:**
Include changes from #26182.
## Test plan
Added new unit test to prove indexer does not hang during startup when
streaming hangs.
---
## Release notes
Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.
For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.
- [ ] Protocol:
- [ ] Nodes (Validators and Full nodes):
- [ ] gRPC:
- [ ] JSON-RPC:
- [ ] GraphQL:
- [ ] CLI:
- [ ] Rust SDK:
- [ ] Indexing Framework:1 parent be9e865 commit 1b27969
22 files changed
Lines changed: 908 additions & 324 deletions
File tree
- crates
- sui-bridge-indexer-alt/src/handlers
- sui-indexer-alt-consistent-store/src/restore
- sui-indexer-alt-framework
- src
- ingestion
- pipeline/concurrent
- sui-rpc-api/src/grpc/v2
- sui-types/src
- examples/rust/walrus-attributes-indexer/src/handlers
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
665 | 665 | | |
666 | 666 | | |
667 | 667 | | |
668 | | - | |
669 | | - | |
670 | | - | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
671 | 671 | | |
672 | 672 | | |
673 | 673 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| 157 | + | |
157 | 158 | | |
158 | 159 | | |
159 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
22 | 24 | | |
23 | | - | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
0 commit comments