Index: db.scm ================================================================== --- db.scm +++ db.scm @@ -66,35 +66,38 @@ (if (not dbexists) (db:initialize db)) (db:set-sync db) db)) -(define (open-run-close proc idb . params) +(define (open-run-close-no-exception-handling proc idb . params) (let* ((db (if idb idb (open-db))) (res #f)) (db:set-sync db) (set! res (apply proc db params)) (if (not idb)(sqlite3:finalize! db)) res)) -;; (let ((runner (lambda () -;; (let* ((db (if idb idb (open-db))) -;; (res #f)) -;; (db:set-sync db) -;; (set! res (apply proc db params)) -;; (if (not idb)(sqlite3:finalize! db)) -;; res)))) -;; (handle-exceptions -;; exn -;; (begin -;; (debug:print 0 "EXCEPTION: database probably overloaded?") -;; (debug:print 0 " " exn) -;; (print-call-chain) -;; (thread-sleep! (random 120)) -;; (debug:print 0 "trying db call one more time....") -;; (runner)) -;; (runner)))) +(define (open-run-close-exception-handling proc idb . params) + (let ((runner (lambda () + (let* ((db (if idb idb (open-db))) + (res #f)) + (db:set-sync db) + (set! res (apply proc db params)) + (if (not idb)(sqlite3:finalize! db)) + res)))) + (handle-exceptions + exn + (begin + (debug:print 0 "EXCEPTION: database probably overloaded?") + (debug:print 0 " " exn) + (print-call-chain) + (thread-sleep! (random 120)) + (debug:print 0 "trying db call one more time....") + (runner)) + (runner)))) + +(define open-run-close open-run-close-exception-handling) (define *global-delta* 0) (define *last-global-delta-printed* 0) (define (open-run-close-measure proc idb . params) Index: tests/fullrun/megatest.config ================================================================== --- tests/fullrun/megatest.config +++ tests/fullrun/megatest.config @@ -10,11 +10,11 @@ [include config/mt_include_1.config] [setup] # FULL or 2, NORMAL or 1, OFF or 0 -synchronous NORMAL +synchronous OFF # Throttle roughly scales the db access milliseconds to seconds delay throttle 0.2 # Max retries allows megatest to re-check that a tests status has changed # as tests can have transient FAIL status occasionally maxretries 500