Commit 54794d1
committed
fix(api): listCaches reads __stats from prefix, not name
readBaseStats(client, key) constructs ${key}:__stats. listCaches was
passing marker.name; for caches whose discovery-marker name happens
to equal their prefix this is fine, but the protocol allows the two
to differ (e.g. an alias-style registration). Stats would then read
from the wrong key and report zeros even for an active cache.
Adds a regression test where ALIAS != PREFIX and asserts stats are
sourced from PREFIX.1 parent c7c02c5 commit 54794d1
2 files changed
Lines changed: 19 additions & 1 deletion
File tree
- apps/api/src/cache-proposals
- __tests__
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
135 | 153 | | |
136 | 154 | | |
137 | 155 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
0 commit comments