tursodatabase/turso

Page modification safety property in the simulator

オープン

#4,240 opened on 2025/12/16

 (1 件のコメント) (0 件のリアクション) (0 人の担当者)Rust (1,001 件のフォーク)github user discovery
enhancementhelp wantedsimulator

Repository metrics

Stars
 (19,103 個のスター)
PR merge metrics
 (平均マージ 2d 11h) (30d で 147 merged PRs)

説明

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.

コントリビューターガイド