Repository navigation
feat: add versioned JSON storage backend - #23
Merged
Merged
Conversation
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #7:新增可選的 JSON 儲存 adapter。設定
backend: JSON後,插件會在首次啟動時自動建立版本化資料檔與 anti-abuse key;讀取損毀或不支援版本時停止寫入,寫檔使用原子替換並保留前一份快照。沿用現有儲存契約與交易語意,並將 Gson 2.14.0 封裝、搬移到插件私有命名空間,以避開伺服器內建 Gson 的版本差異。JSON backend 適合單一伺服器實例;目前以暫存 SQLite 執行交易,再持久化 JSON 快照。部署與備份限制見
docs/operations/json-storage.md。Refs #7。驗證:相關測試 76 通過,Java 8 JAR 檢查通過;全新 TestLab 的 Spigot 1.8.8、Spigot 26.2、Paper 26.2 均能啟動,最低 Spigot 與最新 Paper 重啟後可讀回同一 JSON 與 key。受測 JAR SHA-256:
99CE69BE0A38679EDD914AC608C0B0ACC85FE5BCD6A88D80B44FCEF3238BDADA。完整紀錄見docs/testing/evidence/2026-09-23-issue-7-json-smoke.md。本機沒有 MySQL 測試服務,相關 integration tests 依既有設定略過;真人玩家流程留待後續集中驗收。測試時Command1意外連入,不計入玩家驗收結果。