Index: dbfile.scm ================================================================== --- dbfile.scm +++ dbfile.scm @@ -53,10 +53,12 @@ (define keep-age-param (make-parameter 10)) ;; qif file age, if over move to attic (define num-run-dbs (make-parameter 10)) ;; number of db's in .mtdb (define dbfile:sync-method (make-parameter 'attach)) ;; 'attach or 'original (define dbfile:cache-method (make-parameter 'inmem)) ;; 'direct +(define dbcache-mode (make-parameter 'tmp)) ;; 'inmem, 'tmp (changes what open inmem routine does) + ;; 'original - use old condition code ;; 'suicide-mode - create mtrah/stop-the-train with info on what went wrong ;; else use no condition code (should be production mode) ;; Index: dbmod.scm ================================================================== --- dbmod.scm +++ dbmod.scm @@ -42,12 +42,10 @@ commonmod dbfile debugprint ) -(define dbcache-mode (make-parameter 'tmp)) ;; 'inmem, 'tmp - ;; NOTE: This returns only the name "1.db", "main.db", not the path ;; (define (dbmod:run-id->dbfname run-id) (conc (dbfile:run-id->dbnum run-id)".db")) Index: launch.scm ================================================================== --- launch.scm +++ launch.scm @@ -28,10 +28,11 @@ (declare (uses commonmod)) (declare (uses configf)) (declare (uses db)) (declare (uses rmtmod)) (declare (uses ezsteps)) +;; (declare (uses dbmod)) (declare (uses dbfile)) (declare (uses mtargs)) (use regex regex-case base64 sqlite3 srfi-18 directory-utils posix-extras z3 call-with-environment-variables csv) @@ -38,19 +39,21 @@ (use typed-records pathname-expand matchable) (import (prefix base64 base64:) (prefix sqlite3 sqlite3:) (prefix mtargs args:) - rmtmod - debugprint) +) (include "common_records.scm") (include "key_records.scm") (include "db_records.scm") (include "megatest-fossil-hash.scm") (import commonmod + rmtmod + debugprint + ;; dbmod dbfile) ;;====================================================================== ;; ezsteps ;;====================================================================== @@ -1183,10 +1186,17 @@ ;; if have -append-config then read and append here (let ((cfname (args:get-arg "-append-config"))) (if (and cfname (file-read-access? cfname)) (read-config cfname *configdat* #t))) ;; values are added to the hash, no need to do anything special. + ;; have config at this time, this is a good place to set params based on config file settings + (let* ((dbmode (configf:lookup *configdat* "setup" "dbcache-mode"))) + (if dbmode + (begin + (debug:print-info 0 *default-log-port* "Overriding dbmode to "dbmode) + (dbcache-mode (string->symbol dbmode))))) + *toppath*))) (define (get-best-disk confdat testconfig) (let* ((disks (or (and testconfig (hash-table-ref/default testconfig "disks" #f))