Suppose the user of a Web app gets an exception in the middle of a Transaction, so the Transaction fails to Commit or Rollback. My experience shows that if this happens, a SQLite journal file will be left in that folder. Sounds right. Further suppose, after testing this locally, I have that file hosted by a CubeSQLServer installation. I’m pretty sure that automatically makes the SQLite file run in WAL Mode, in case that matters.
What happens when that file is hosted by CubeSQLServer and a similar event happens, leaving a journal file in its folder? I assume the main file will end up locked. No?
It will eventually time out (the default time can be set by you), allowing other writes to proceed.
Thanks, David. Can I assume two things:
-
When the next write occurs (after the Timeout period), the journal file will disappear.
-
Uncommitted writes that were in that journal file will not be committed.
You can set the Lock timeout with CubeSQL Admin.
Thanks, David. Yes, I noticed that setting after I read you prior post and left it to 800 ms. But I was wondering what happens to that journal file after 800 ms. I now see that changes in that journal file are not committed and the file is removed. At least that’s what I surmise by the Dealing with hot journals sub section of this section in the SQLite documentation:
https://www.sqlite.org/lockingv3.html