objectbox / objectbox/objectbox-java
Option to shrink unused space
還沒有人認領這個 Issue。
- 主要語言
- Java
- 星號
- 4.6k
- 分支
- 311
- PR 合併指標
- 30 天內沒有已合併 PR
描述
Did not find any info on that, so decided to ask here - is there (or planned) an option to shrink (e.g. compact the database)?
We're using objectbox for quite a long time for a production app one entity there is used to collect various loggable information for further sending it to a server. Successfully sent entities gets removed from the database, however, the physical db file still grows constantly. (which is understandable)
I understand we can always delete the file before creating the ObjectBox instance in order to reduce the unused space, however there are other entities there so we'll need save and recreate them somehow in the new (emptied) datastore. Thus, kind of an option to the builder like .shrinkOnOpen() would be nice to have, so app may check the database size during the initialization process and shrink it when necessary.
Thanks!
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
先檢視 ObjectBox 執行個體開啟時所涉及的 datastore builder 和資料庫生命週期 API,以及目前如何回收未使用的空間。issue 要求的結果是一項可選操作,在保留其他實體的同時安全地縮小實體資料庫檔案;請在留言討論中確認預期行為和限制。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- java
- 領域
- databases, mobile-dev
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 活躍
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100