From: Tuukka Lehtonen Date: Tue, 25 Apr 2017 10:13:45 +0000 (+0300) Subject: Improved Acorn database rollback logic. X-Git-Tag: v1.28.0~12 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=a6898527f0c6e33c2135de20ebf5e3f77b70d56c;hp=a6898527f0c6e33c2135de20ebf5e3f77b70d56c;p=simantics%2Fplatform.git Improved Acorn database rollback logic. MainState will no longer destroy the entire database if the user removes directories but forgets to remove the main.state file. The information stored in main.state is now regarded as cached information only and if it seems invalid or cannot be read, the same normal rollback logic will be performed every time. Another enhancement is that rollback will now automatically store the revisions deleted by the rollback procedure in timestamped /db/recovery/yyyy-M-d_HH-mm-ss/ folders for later inspection and debugging. Previously the code just deleted all the extra revisions. Manually removing the recovery-folder is always a safe operation to perform. Also fixed a bug in databoard Files class readFile methods that take a File as argument. Previously all the functions constructed a BinaryFile using the default mode which is "rw". This unintentionally made the readFile methods create an empty file if the file did not exist. All such methods have been changed to use mode "r". refs #7124 Change-Id: I3ac04d2e33151b33f4982cf7a2edce7ddb896e11 (cherry picked from commit 20dfd0ba5e518a3706cd749c645a0a79480ea36f) ---