tursodatabase/turso

Page modification safety property in the simulator

开放

#4,240 创建于 2025年12月16日

 (1 条评论) (0 个反应) (0 位负责人)Rust (1,001 个派生)github user discovery
enhancementhelp wantedsimulator

仓库指标

星标
 (19,103 个星标)
PR 合并指标
 (平均合并 2天 11小时) (30 天内合并 147 个 PR)

描述

We had some nasty bugs where page was marked dirty after they were modified:

https://github.com/tursodatabase/turso/pull/4231

https://github.com/tursodatabase/turso/pull/4232

Let's extend the simulator to detect these types of cases. For example, we can calculate a page content hash when we load the page from disk. We can then in add_dirty verify that the hash is unchanged; otherwise someone changed the page without first marking it as dirty. We can make the simulator use the hashes to verify things like rollback safety.

贡献者指南