Sqlite 不正常斷電,官網文件說很強,事實上呢?

  1. 通常中獎的機器先前都發生過不正常斷電
  2. 接著就無法啟動,顯示 sqlite database 錯誤(這裡 log 印不夠不知道是甚麼錯誤)
  3. 我們進去手動使用 sqlite 指令開起來下個 PRAGMA integrity_check; 然後就好了
  • database 如果檔案真的爛掉,那麼 integrity check 只會檢查出錯誤而已 -> 應該不是
  • 相關的 lock 被卡住 -> 還是無法解釋 integrity check 之後會好

4. Read-Only Databases




Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ensky Lin

Ensky Lin

More from Medium

Pervasive Package Problems

Beginning work on async functions

Demystifying Single Sign-On with NodeJs & Keycloak SAML

How to run Eclipse MAT (Memory Analyzer Tool) on macOS