Overview
Comment: | Partial transition to ongoing init of db's |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | archiving-db-init |
Files: | files | file ages | folders |
SHA1: |
afe4ca4f8f6d0a57ace7bdbea772c9ae |
User & Date: | mrwellan on 2014-12-02 15:40:16 |
Other Links: | branch diff | manifest | tags |
Context
2014-12-02
| ||
15:40 | Partial transition to ongoing init of db's Closed-Leaf check-in: afe4ca4f8f user: mrwellan tags: archiving-db-init | |
2014-11-30
| ||
22:55 | Fixed couple problems with tasks_queue migration check-in: 35909bedef user: matt tags: archiving | |
Changes
Modified db.scm from [3911c1048a] to [0424e63339].
︙ | |||
172 173 174 175 176 177 178 | 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | - + + + | (dir-writable (file-write-access? parent-dir))) (if dir-writable (let ((exists (file-exists? fname)) (lock (obtain-dot-lock fname 1 5 10)) (db (sqlite3:open-database fname))) (sqlite3:set-busy-handler! db (make-busy-timeout 136000)) (db:set-sync db) ;; (sqlite3:execute db "PRAGMA synchronous = 0;") |
︙ | |||
194 195 196 197 198 199 200 | 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 | - - - - - - - - - - - - - - - - - + | do-not-open) rdb (let* ((dbpath (db:dbfile-path run-id)) ;; (conc toppath "/db/" run-id ".db")) (dbexists (file-exists? dbpath)) (inmem (if local #f (db:open-inmem-db))) (refdb (if local #f (db:open-inmem-db))) (db (db:lock-create-open dbpath ;; this is the database physically on disk |
︙ | |||
273 274 275 276 277 278 279 | 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 | - - - + + + | ;; Open the classic megatest.db file in toppath ;; (define (db:open-megatest-db) (let* ((dbpath (conc *toppath* "/megatest.db")) (dbexists (file-exists? dbpath)) (db (db:lock-create-open dbpath |
︙ | |||
719 720 721 722 723 724 725 | 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 | - + + - - - - - - - - - + + + + + + + + + | ;; (define open-run-close (define open-run-close open-run-close-exception-handling) ;; open-run-close-no-exception-handling ;; open-run-close-exception-handling) ;;) |
︙ | |||
795 796 797 798 799 800 801 | 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 | - + + + + + + + + + | (sqlite3:execute db "INSERT OR REPLACE INTO metadat (var,val) VALUES (?,?);" "MEGATEST_VERSION" megatest-version) (debug:print-info 11 "db:initialize END"))))) ;;====================================================================== ;; R U N S P E C I F I C D B ;;====================================================================== |
︙ | |||
864 865 866 867 868 869 870 871 872 873 874 875 876 877 | 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 | + + + + + + + + + + | id INTEGER PRIMARY KEY, test_id INTEGER, update_time TIMESTAMP, cpuload INTEGER DEFAULT -1, diskfree INTEGER DEFAULT -1, diskusage INTGER DEFAULT -1, run_duration INTEGER DEFAULT 0);"))) (sqlite3:execute db "INSERT OR IGNORE INTO tests (id,run_id,testname,event_time,item_path,state,status) VALUES (?,?,'bogustest',strftime('%s',' (* run-id 30000) ;; allow for up to 30k tests per run run-id) ;; do a dummy query to test that the table exists and the db is truly readable (sqlite3:execute db "SELECT * FROM tests WHERE id=?;" (* run-id 30000)) )))) ;; add strings db to rundb, not in use yet db) ;;====================================================================== ;; L O G G I N G D B ;;====================================================================== (define (open-logging-db) ;; (conc *toppath* "/megatest.db") (car *configinfo*))) |
︙ |
Modified tests/fullrun/megatest.config from [4a5fb14ff7] to [b3e467573f].
︙ | |||
131 132 133 134 135 136 137 | 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | - + - + | # If the server can't be started on this port it will try the next port until # it succeeds port 8080 # This server will keep running this number of hours after last access. # Three minutes is 0.05 hours # timeout 0.025 |
︙ |