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.

貢獻者指南