Differences From Artifact [297c5db2ed]:
- File dbmod.scm — part of check-in [b5df408582] at 2023-04-11 21:32:21 on branch v1.80 — Throttle writes more than reads using mutex, avoid doing sync when writes are happening using mutex. This is a monte carlo approach. Might need tweaking. (user: matt, size: 30199) [annotate] [blame] [check-ins using]
To Artifact [b5162d04d6]:
- File dbmod.scm — part of check-in [b6788d6803] at 2023-04-13 15:54:16 on branch v1.80 — added assert for good db to dbmod:with-db (user: mmgraham, size: 30277) [annotate] [blame] [check-ins using] [more...]
︙ | |||
101 102 103 104 105 106 107 108 109 110 111 112 113 114 | 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | + | (begin (sync-proc last-update) ;; MOVE THIS CALL TO INSIDE THE sync-proc CALL (dbr:dbstruct-last-update-set! dbstruct curr-secs) ))) (assert (sqlite3:database? dbh) "FATAL: bad db handle in dbmod:with-db") (if use-mutex (mutex-lock! *db-with-db-mutex*)) (let* ((res (apply proc dbdat dbh params))) (if use-mutex (mutex-unlock! *db-with-db-mutex*)) res))) (define (db:with-db dbstruct run-id w/r proc . params) (dbmod:with-db dbstruct run-id w/r proc params)) |
︙ |