Commit 2e872e2
committed
security: cache certificate expiration metrics as pointers
Changes in #130110 were added to add labelled ttl metrics to
client certificates. It achieved this by changing the system
which cached certificate expiries to cache on a composite
struct of two metrics, rather than just an expiration
metric.
The struct itself housed the metrics as inline values,
rather than pointers, so updates were registered in the
cached values only, and not the registry in which they were
reporting. This means that updates to client certificate
expirations would not be reflected by the ttl or expiration
metrics.
This ticket modifies those elements so that they are not
copied when they are pulled from the cache.
Fixes: #142681
Epic: CRDB-40209
Release note (bug fix): Fixes bug in client certificate expiration metrics.1 parent 0b153e7 commit 2e872e2
File tree
3 files changed
+54
-18
lines changed- pkg/security
3 files changed
+54
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
115 | | - | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
121 | 120 | | |
122 | 121 | | |
123 | 122 | | |
124 | 123 | | |
125 | | - | |
126 | 124 | | |
127 | 125 | | |
128 | 126 | | |
129 | 127 | | |
130 | | - | |
131 | 128 | | |
132 | 129 | | |
133 | 130 | | |
134 | 131 | | |
135 | | - | |
136 | 132 | | |
137 | 133 | | |
138 | 134 | | |
139 | 135 | | |
140 | | - | |
141 | 136 | | |
142 | 137 | | |
143 | 138 | | |
144 | 139 | | |
145 | | - | |
146 | 140 | | |
147 | 141 | | |
148 | 142 | | |
149 | 143 | | |
150 | | - | |
151 | 144 | | |
152 | 145 | | |
153 | 146 | | |
154 | 147 | | |
155 | | - | |
156 | 148 | | |
157 | 149 | | |
158 | 150 | | |
159 | 151 | | |
160 | | - | |
161 | 152 | | |
162 | 153 | | |
163 | 154 | | |
164 | 155 | | |
165 | | - | |
166 | 156 | | |
167 | 157 | | |
168 | 158 | | |
169 | 159 | | |
170 | | - | |
171 | 160 | | |
172 | 161 | | |
173 | 162 | | |
174 | 163 | | |
175 | | - | |
176 | 164 | | |
177 | 165 | | |
178 | 166 | | |
179 | 167 | | |
180 | | - | |
181 | 168 | | |
182 | 169 | | |
183 | 170 | | |
184 | 171 | | |
185 | | - | |
186 | 172 | | |
187 | 173 | | |
188 | 174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
| 38 | + | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
123 | 173 | | |
124 | 174 | | |
125 | 175 | | |
| |||
0 commit comments