Commit 16f6430
authored
Bound chat-list and media retention query work (#1749)
* Bound media reference retention work
Index cached secrets by group and epoch so retaining a media message
does not scan unrelated exporter history. Mark shared epoch rows once
per message and avoid rewriting secrets already managed by retention.
Cover reference replay, history scaling, and populated migration
upgrades while preserving epoch retirement behavior.
* Bound chat readiness and pinned-list query work
Index each group's receipt timestamps so checking a complete chat
projection does not scan retained message history. Compute pin ranks
once for full-list reads instead of counting earlier pins per row.
Keep keyed lookups and ranks across gaps or missing projections intact.
Cover query scaling, stale receipt detection, archive filtering, and
populated index upgrades.
* Benchmark file-backed chat-list readiness
Measure release-mode readiness and row fetches on encrypted files
with 10,000 and 100,000 retained messages. Alternate the receipt
index off and on, exclude setup, and verify identical chat rows.1 parent 008c128 commit 16f6430
7 files changed
Lines changed: 428 additions & 57 deletions
File tree
- crates/storage-sqlite/src
- chat_list
- migrations
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2316 | 2316 | | |
2317 | 2317 | | |
2318 | 2318 | | |
2319 | | - | |
2320 | | - | |
2321 | | - | |
2322 | | - | |
2323 | | - | |
2324 | | - | |
| 2319 | + | |
| 2320 | + | |
| 2321 | + | |
| 2322 | + | |
2325 | 2323 | | |
2326 | | - | |
2327 | | - | |
2328 | | - | |
2329 | | - | |
2330 | | - | |
2331 | | - | |
| 2324 | + | |
2332 | 2325 | | |
| 2326 | + | |
| 2327 | + | |
| 2328 | + | |
| 2329 | + | |
| 2330 | + | |
| 2331 | + | |
| 2332 | + | |
| 2333 | + | |
| 2334 | + | |
| 2335 | + | |
| 2336 | + | |
| 2337 | + | |
2333 | 2338 | | |
2334 | 2339 | | |
2335 | 2340 | | |
| |||
2358 | 2363 | | |
2359 | 2364 | | |
2360 | 2365 | | |
2361 | | - | |
| 2366 | + | |
2362 | 2367 | | |
2363 | 2368 | | |
2364 | 2369 | | |
| |||
2412 | 2417 | | |
2413 | 2418 | | |
2414 | 2419 | | |
2415 | | - | |
| 2420 | + | |
| 2421 | + | |
2416 | 2422 | | |
2417 | 2423 | | |
2418 | 2424 | | |
| |||
2434 | 2440 | | |
2435 | 2441 | | |
2436 | 2442 | | |
2437 | | - | |
2438 | | - | |
2439 | | - | |
2440 | | - | |
2441 | | - | |
| 2443 | + | |
2442 | 2444 | | |
2443 | 2445 | | |
2444 | 2446 | | |
| |||
2460 | 2462 | | |
2461 | 2463 | | |
2462 | 2464 | | |
2463 | | - | |
2464 | | - | |
| 2465 | + | |
| 2466 | + | |
| 2467 | + | |
2465 | 2468 | | |
2466 | 2469 | | |
2467 | 2470 | | |
2468 | 2471 | | |
2469 | 2472 | | |
2470 | | - | |
2471 | | - | |
2472 | | - | |
2473 | | - | |
2474 | | - | |
2475 | | - | |
2476 | | - | |
2477 | | - | |
2478 | | - | |
2479 | | - | |
2480 | | - | |
2481 | | - | |
2482 | | - | |
2483 | | - | |
2484 | | - | |
2485 | | - | |
2486 | | - | |
2487 | | - | |
2488 | | - | |
2489 | | - | |
2490 | | - | |
2491 | | - | |
2492 | | - | |
2493 | | - | |
2494 | | - | |
2495 | | - | |
2496 | | - | |
2497 | | - | |
| 2473 | + | |
2498 | 2474 | | |
2499 | 2475 | | |
2500 | | - | |
2501 | | - | |
| 2476 | + | |
| 2477 | + | |
| 2478 | + | |
2502 | 2479 | | |
2503 | 2480 | | |
2504 | 2481 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
161 | 239 | | |
162 | 240 | | |
163 | 241 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
| 248 | + | |
| 249 | + | |
249 | 250 | | |
250 | 251 | | |
251 | 252 | | |
252 | 253 | | |
253 | 254 | | |
254 | 255 | | |
255 | 256 | | |
256 | | - | |
| 257 | + | |
257 | 258 | | |
258 | 259 | | |
259 | 260 | | |
260 | 261 | | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
261 | 265 | | |
262 | 266 | | |
263 | 267 | | |
264 | 268 | | |
265 | | - | |
| 269 | + | |
| 270 | + | |
266 | 271 | | |
267 | 272 | | |
268 | 273 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
135 | 139 | | |
136 | 140 | | |
137 | 141 | | |
| |||
485 | 489 | | |
486 | 490 | | |
487 | 491 | | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
488 | 502 | | |
489 | 503 | | |
490 | 504 | | |
| |||
1255 | 1269 | | |
1256 | 1270 | | |
1257 | 1271 | | |
1258 | | - | |
| 1272 | + | |
1259 | 1273 | | |
1260 | 1274 | | |
1261 | 1275 | | |
| |||
1311 | 1325 | | |
1312 | 1326 | | |
1313 | 1327 | | |
1314 | | - | |
| 1328 | + | |
1315 | 1329 | | |
1316 | 1330 | | |
1317 | 1331 | | |
| |||
1615 | 1629 | | |
1616 | 1630 | | |
1617 | 1631 | | |
1618 | | - | |
| 1632 | + | |
1619 | 1633 | | |
1620 | 1634 | | |
1621 | 1635 | | |
| |||
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
0 commit comments