Commit 5cce42a
authored
feat(meta): add KvGetMany gRPC API; refactor: split chained awaits (#19244)
* feat(meta): add `KvGetMany` gRPC API for batch key lookups
Add bidirectional streaming gRPC API for looking up multiple keys.
The client streams `KvGetManyRequest` messages (one key per message),
and the server responds with a stream of `StreamItem` results.
Changes:
- Add `KvGetManyRequest` proto message and `KvGetMany` RPC
- Implement `MetaLeader::kv_get_many()` for streaming key lookups
- Add leader check in `MetaNode::handle_kv_get_many()`
- Add `MetaHandle::handle_kv_get_many()` cross-runtime bridge
- Implement gRPC service handler with token check and metrics
- Add `EstablishedClient::kv_get_many()` client method
- Add integration tests for leader, follower, and no-quorum scenarios
- Fix: #349
* refactor: split chained await statements for readability
Split chained `.await?.try_collect().await?` and
`.await?.map_ok(...).try_collect().await?` patterns into separate
statements across the codebase for improved readability and debugging.
Changes:
- Split patterns in `schema_api.rs`, `sequence_api_impl.rs`, `database_util.rs`
- Split patterns in `kv_pb_api/mod.rs`, `tag_api.rs`
- Split patterns in `compact_all.rs`, `leveled_map_test.rs`
- Split patterns in `db_scoped_seq_bounded_read_test.rs`, `sm_v003_test.rs`
- Split patterns in `compact_with_db_test.rs`, `store.rs`
- Split patterns in `udf_mgr.rs`, `stage.rs`
- Split patterns in `kvapi_test_suite.rs`
- Split patterns in query service tests: `io.rs`, `commit.rs`, `truncate.rs`,
`navigate.rs`, `index_scan.rs`, `index_refresh.rs`1 parent 5451e1a commit 5cce42a
File tree
30 files changed
+453
-275
lines changed- src
- common/storage/src
- meta
- api/src
- kv_pb_api
- client
- src
- tests/it
- kvapi-test-suite/src
- raft-store/src
- leveled_store
- immutable_levels
- leveled_map
- sm_v003
- service
- src
- api/grpc
- meta_node
- meta_service
- tests/it
- grpc
- types/proto
- query
- management/src/udf
- service/tests/it
- indexes/aggregating_index
- storages/fuse
- operations
30 files changed
+453
-275
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
235 | 234 | | |
236 | 235 | | |
237 | 236 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
| 157 | + | |
| 158 | + | |
162 | 159 | | |
163 | 160 | | |
164 | 161 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
863 | 863 | | |
864 | 864 | | |
865 | 865 | | |
866 | | - | |
867 | | - | |
868 | | - | |
869 | | - | |
870 | | - | |
| 866 | + | |
| 867 | + | |
871 | 868 | | |
872 | 869 | | |
873 | 870 | | |
874 | 871 | | |
875 | | - | |
876 | | - | |
877 | | - | |
878 | | - | |
879 | | - | |
| 872 | + | |
| 873 | + | |
880 | 874 | | |
881 | 875 | | |
882 | 876 | | |
883 | | - | |
884 | | - | |
885 | | - | |
886 | | - | |
887 | | - | |
| 877 | + | |
| 878 | + | |
888 | 879 | | |
889 | 880 | | |
890 | 881 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
348 | 348 | | |
349 | 349 | | |
350 | 350 | | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
| 351 | + | |
| 352 | + | |
356 | 353 | | |
357 | 354 | | |
358 | 355 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
138 | | - | |
139 | | - | |
| 137 | + | |
| 138 | + | |
140 | 139 | | |
141 | 140 | | |
142 | 141 | | |
| |||
145 | 144 | | |
146 | 145 | | |
147 | 146 | | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
| 147 | + | |
| 148 | + | |
153 | 149 | | |
154 | 150 | | |
155 | 151 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
192 | | - | |
193 | | - | |
| 191 | + | |
| 192 | + | |
194 | 193 | | |
195 | 194 | | |
196 | 195 | | |
| |||
482 | 481 | | |
483 | 482 | | |
484 | 483 | | |
485 | | - | |
486 | | - | |
487 | | - | |
| 484 | + | |
| 485 | + | |
488 | 486 | | |
489 | 487 | | |
490 | 488 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
280 | 281 | | |
281 | 282 | | |
282 | 283 | | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
283 | 292 | | |
284 | 293 | | |
285 | 294 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
173 | 176 | | |
174 | 177 | | |
175 | 178 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
100 | 110 | | |
101 | 111 | | |
102 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
616 | 616 | | |
617 | 617 | | |
618 | 618 | | |
619 | | - | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
| 619 | + | |
| 620 | + | |
625 | 621 | | |
626 | 622 | | |
627 | 623 | | |
| |||
631 | 627 | | |
632 | 628 | | |
633 | 629 | | |
634 | | - | |
635 | | - | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
| 630 | + | |
| 631 | + | |
640 | 632 | | |
641 | 633 | | |
642 | 634 | | |
643 | 635 | | |
644 | 636 | | |
645 | 637 | | |
646 | 638 | | |
647 | | - | |
648 | | - | |
649 | | - | |
650 | | - | |
651 | | - | |
652 | | - | |
| 639 | + | |
| 640 | + | |
653 | 641 | | |
654 | 642 | | |
655 | 643 | | |
656 | | - | |
| 644 | + | |
657 | 645 | | |
658 | | - | |
659 | | - | |
660 | | - | |
661 | 646 | | |
| 647 | + | |
662 | 648 | | |
663 | 649 | | |
664 | 650 | | |
| |||
0 commit comments