Commit c782895
committed
Route search-path metastore reads to the read replica
Add `ReadReplicaRoutingMetastore`, a `MetastoreService` wrapper that
routes the stale-tolerant reads issued by the search and analytics paths
(`index_metadata`, `indexes_metadata`, `list_indexes_metadata`,
`list_splits`, `list_metrics_splits`, `list_sketch_splits`) to read
replica nodes when any are connected, and everything else (writes and
non-hot-path reads) to the primary.
- Routing is decided per request from the read replica balance channel's
live connection set, so it degrades to the primary when no replica is
deployed. The check is a synchronous `watch` read with no borrow held
across an await.
- Wire it into the searcher service and the DataFusion session builder, so
all search (REST, Elasticsearch, gRPC) and metrics analytics benefit,
while REST admin handlers keep read-your-writes against the primary.1 parent 80110b7 commit c782895
4 files changed
Lines changed: 471 additions & 2 deletions
File tree
- quickwit
- quickwit-metastore/src
- metastore
- quickwit-serve/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
0 commit comments