1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// SPDX-License-Identifier: BUSL-1.1
//! Boot stage 3 of 3: replay the WAL, then run the crash-recovery HNSW rebuild
//! backstop.
//!
//! Runs last. See `replay_wal_and_rebuild_indexes` for why that order is the
//! only sound one.
use crateCoreLoop;
/// Replay WAL records for crash recovery, then re-index the HNSW from the
/// durable store.
///
/// # Ordering (load-bearing)
///
/// Runs AFTER `load_boot_checkpoints` and `seed_catalog_state`, never before:
/// each checkpoint restores state as of the LSN it was stamped with and installs
/// the replay floor that makes this replay resume strictly ABOVE that LSN, so
/// replaying first and restoring after would overwrite the newer replayed state
/// with the older checkpoint's rows. The seeds must likewise already be in place,
/// or replay infers schemas it should have been handed.
///
/// The vector rebuild backstop runs after the replay within this function for
/// the same reason it is an idempotent overlay — see the comment at the call.
pub