almog
01/08/2025, 2:00 AMlast_clock_tick in the manifest to be the last durable clock tick, which is the greatest timestamp in wal_id_last_seen (or the greatest timestamp in L0 for wal_disabled). The problem is that wal_id_last_seen is updated on freeze_wal, not when the wal is flushed, so it's technically possible that a manifest is flushed with a wal_id_last_seen that's greater than the last durable WAL.
So what I'm noticing is that there's a bit of a "drift" between the CoreDbState and the flushed manifest and I'm not totally sure how to reconcile it. One option is to add a last_durable_clock_tick and last_durable_wal_id_seen and those are the ones that make it into the manifest, and they're updated atomically after a WAL is flushed successfully, but that seems to add some complicated bookkeeping. Thoughts?almog
01/08/2025, 2:17 AMflaneur233
01/08/2025, 4:50 AMflaneur233
01/08/2025, 4:51 AMRohan
01/08/2025, 5:00 AMwal_id_last_seen that's greater than the last flushed manifest and then crash and restart, then we'll actually crash when recovering because we assert that we have all the wals up to wal_id_last_seenRohan
01/08/2025, 5:00 AMRohan
01/08/2025, 5:03 AMCoreDbState only when a wal id (or memtable) is flushed, and to track them for the db outside of CoreDbStateRohan
01/08/2025, 5:09 AMflaneur233
01/08/2025, 5:12 AMflaneur233
01/08/2025, 5:13 AMalmog
01/08/2025, 6:44 PM