MerginMaps / MerginMaps/python-api-client
Vacuuming
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 23
- 派生
- 12
- 平均合并
- 2 天 13 小时
- 30 天内合并 PR
- 7
描述
https://github.com/MerginMaps/python-api-client/blob/master/mergin/utils.py#L99
Vacuuming could be useful even for gpkgs without the -wal sidecar
Vacuuming takes some time, so we should check that it is worth it.
Sources
https://gdal.org/en/stable/drivers/vector/gpkg.html
When dropping a table, or removing records from tables, the space they occupied is not immediately released and kept in the pool of file pages that SQLite may reuse later. If you need to shrink the file to its minimum size, you need to issue an explicit "VACUUM" SQL request.
https://sqlite.org/lang_vacuum.html
When content is deleted from an SQLite database, the content is not usually erased, but rather the space used to hold the content is marked as being available for reuse.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 mergin/utils.py 第 99 行开始,阅读链接的 GDAL GeoPackage 和 SQLite VACUUM 指南。检查当前逻辑如何判断是否值得执行 VACUUM,包括没有 -wal 伴随文件的 GeoPackages。完成的标准是该判断涵盖这种情况,且不会进行不必要的 VACUUM;使用项目现有的测试进行验证。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python, sqlite
- 领域
- databases
- Issue 类型
- 功能
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 活跃
- 描述清晰度
- 基本清楚
- 新手友好度
- 68/100