Index: Makefile ================================================================== --- Makefile +++ Makefile @@ -154,11 +154,12 @@ $(INSTALL) mt-pg.sql $(PREFIX)/share/db/mt-pg.sql # Special dependencies for the includes $(MOFILE) $(MOIMPFILES) : megatest-fossil-hash.scm -# common.o : mofiles/commonmod.o megatest-fossil-hash.scm +common.o : mofiles/commonmod.o megatest-fossil-hash.scm + # mofiles/dbmod.o : mofiles/configfmod.o # commonmod.o dashboard.o megatest.o tcmt.o apimod.o : megatest-fossil-hash.scm tests.o db.o launch.o runs.o dashboard-tests.o \ Index: api.scm ================================================================== --- api.scm +++ api.scm @@ -239,11 +239,11 @@ ((test-data-rollup) (apply db:test-data-rollup dbstruct params)) ((csv->test-data) (apply db:csv->test-data dbstruct params)) ;; MISC ((sync-inmem->db) (let ((run-id (car params))) - (db:sync-touched dbstruct run-id force-sync: #t))) + (db:sync-touched dbstruct run-id db:initialize-main-db force-sync: #t))) ((mark-incomplete) (apply db:find-and-mark-incomplete dbstruct params)) ((create-all-triggers) (db:create-all-triggers dbstruct)) ((drop-all-triggers) (db:drop-all-triggers dbstruct)) ;; TESTMETA Index: common.scm ================================================================== --- common.scm +++ common.scm @@ -26,12 +26,12 @@ (prefix sqlite3 sqlite3:) pkts (prefix dbi dbi:) ) (declare (unit common)) -;; (declare (uses commonmod)) -;; (import commonmod) +(declare (uses commonmod)) +(import commonmod) (include "common_records.scm") ;; (require-library margs) Index: db.scm ================================================================== --- db.scm +++ db.scm @@ -630,11 +630,11 @@ ;; (lambda () ;; (if (and (common:file-exists? megatest-db) ;; (file-write-access? megatest-db)) ;; (begin ;; (db:sync-to-megatest.db dbstruct 'timestamps) ;; internally mutexes on *db-local-sync* -;; (debug:print-info 2 *default-log-port* "Done syncing to megatest.db")))) +;; (debug:print-info 2 *default-log-port* "Done syncing to megatest.db")))) ;; "call-with-cached-db sync-to-megatest.db")) ;; (cache-db (db:cache-for-read-only ;; megatest-db ;; (conc cache-dir "/" fname) ;; use-last-update: #t))) @@ -644,11 +644,11 @@ (define (db:all-db-sync dbstruct) - (let* ((dbdat (db:open-db dbstruct #f)) + (let* ((dbdat (db:open-db dbstruct #f db:initialize-main-db)) (data-synced 0) ;; count of changed records (tmp-area (common:get-db-tmp-area)) (dbfiles (glob (conc tmp-area"/.db/*.db"))) (sync-durations (make-hash-table)) (no-sync-db (db:open-no-sync-db))) Index: dbfile.scm ================================================================== --- dbfile.scm +++ dbfile.scm @@ -526,11 +526,11 @@ "cp "backupfname" "fname))) (dbfile:print-err "WARNING: attempting recovery of file "fname" by running commands:\n" " "cmd) (system cmd))) -(define (dbfile:cautious-open-database-orig fname init-proc #!optional (tries-left 50)) +#;(define (dbfile:cautious-open-database-orig fname init-proc #!optional (tries-left 50)) (let* ((lock-file (conc fname".lock")) (delay-time (* (- 51 tries-left) 1.1)) (retry (lambda () (thread-sleep! delay-time) (if (> tries-left 0) Index: http-transport.scm ================================================================== --- http-transport.scm +++ http-transport.scm @@ -36,16 +36,17 @@ (declare (uses server)) ;; (declare (uses daemon)) (declare (uses portlogger)) (declare (uses rmt)) (declare (uses dbfile)) +(declare (uses commonmod)) (include "common_records.scm") (include "db_records.scm") (include "js-path.scm") -(import dbfile) +(import dbfile commonmod) (require-library stml) (define (http-transport:make-server-url hostport) (if (not hostport) #f