transaction-correctness by tursodatabase/turso
npx skills add https://github.com/tursodatabase/turso --skill transaction-correctnessTurso 专门使用 WAL(预写日志)模式。
文件:.db、.db-wal(没有 .db-shm - Turso 使用内存中的 WAL 索引)
将 WAL 内容传输回主数据库。
WAL 增长 → 触发检查点(默认:1000 页) → 页面复制到数据库 → WAL 重用
检查点类型:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
SQLite 使用共享内存文件(-shm)作为 WAL 索引。Turso 不使用 - 它使用内存中的数据结构(frame_cache 哈希映射,原子读取标记),因为不支持多进程访问。
崩溃时:
关键文件:
每个连接(私有):
Pager - 页面缓存,脏页,保存点,提交状态WalFile - 连接的快照视图:
max_frame / min_frame - 此连接快照的帧范围max_frame_read_lock_index - 此连接持有的读取锁槽位last_checksum - 滚动校验和状态跨连接共享:
WalFileShared - 全局 WAL 状态:
frame_cache - 页面到帧的索引(替代 .shm 文件)max_frame / nbackfills - 全局 WAL 进度read_locks[5] - 读取标记槽位(带有嵌入式帧值的 TursoRwLock)write_lock - 排他写入器锁checkpoint_lock - 检查点序列化file - WAL 文件句柄DatabaseStorage - 主 .db 文件BufferPool - 共享内存分配每周安装量
374
仓库
GitHub 星标数
17.9K
首次出现
2026 年 1 月 28 日
安全审计
安装于
claude-code296
github-copilot182
opencode116
gemini-cli116
codex116
cursor110
Turso uses WAL (Write-Ahead Logging) mode exclusively.
Files: .db, .db-wal (no .db-shm - Turso uses in-memory WAL index)
Transfers WAL content back to main DB.
WAL grows → checkpoint triggered (default: 1000 pages) → pages copied to DB → WAL reused
Checkpoint types:
SQLite uses a shared memory file (-shm) for WAL index. Turso does not - it uses in-memory data structures (frame_cache hashmap, atomic read marks) since multi-process access is not supported.
On crash:
Key files:
Per-Connection (private):
Pager - page cache, dirty pages, savepoints, commit stateWalFile - connection's snapshot view:
max_frame / min_frame - frame range for this connection's snapshotmax_frame_read_lock_index - which read lock slot this connection holdslast_checksum - rolling checksum stateShared across connections:
WalFileShared - global WAL state:
frame_cache - page-to-frame index (replaces .shm file)max_frame / nbackfills - global WAL progressread_locks[5] - read mark slots (TursoRwLock with embedded frame values)write_lock - exclusive writer lockcheckpoint_lock - checkpoint serializationfile - WAL file handleDatabaseStorage - main fileWeekly Installs
374
Repository
GitHub Stars
17.9K
First Seen
Jan 28, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
claude-code296
github-copilot182
opencode116
gemini-cli116
codex116
cursor110
Android 整洁架构指南:模块化设计、依赖注入与数据层实现
828 周安装
Python类型注解模式指南:现代类型提示与Typing最佳实践
24 周安装
Web应用安全模式指南:OWASP Top 10防护、输入验证、身份认证与授权最佳实践
25 周安装
task-runner任务运行器:使用just简化项目命令执行,替代make的跨平台工具
30 周安装
EdgeOne Pages 一键部署:无需账户,秒级将HTML文件发布到公共URL
35 周安装
Vibe Security 安全扫描器 - 多语言代码漏洞检测与AI智能修复工具
38 周安装
wechat-publisher:一键发布Markdown文章到微信公众号草稿箱工具
323 周安装
.dbBufferPool - shared memory allocation