Overview
Comment: | remove-mutex |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | v1.65-lazyqueue-items-rollup |
Files: | files | file ages | folders |
SHA1: |
022801133154585551c60feee4baf675 |
User & Date: | matt on 2021-01-26 09:16:26 |
Other Links: | branch diff | manifest | tags |
Context
2021-01-26
| ||
20:05 | Merged in the removeal of fastmode (which did nothing) check-in: 4d5af74171 user: matt tags: v1.65-lazyqueue-items-rollup | |
09:16 | remove-mutex check-in: 0228011331 user: matt tags: v1.65-lazyqueue-items-rollup | |
2021-01-25
| ||
12:58 | add finalize of no-sync and re-enable the mutex check-in: 1775254e3f user: matt tags: v1.65-lazyqueue-items-rollup | |
Changes
Modified db.scm from [4ac600d8c0] to [75f9b33ac0].
︙ | ︙ | |||
3996 3997 3998 3999 4000 4001 4002 | ;; (("WARN" "FAIL") '("COMPLETED" "FAIL")) ;; (("WARN" "CHECK") '("COMPLETED" "CHECK")) ;; (("WARN" "DEAD") (define (db:set-state-status-and-roll-up-items dbstruct run-id test-name item-path state status comment) ;; establish info on incoming test followed by info on top level test ;; BBnote - for mode itemwait, linkage between upstream test & matching item status is propagated to run queue in db:prereqs-not-met | | | 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 | ;; (("WARN" "FAIL") '("COMPLETED" "FAIL")) ;; (("WARN" "CHECK") '("COMPLETED" "CHECK")) ;; (("WARN" "DEAD") (define (db:set-state-status-and-roll-up-items dbstruct run-id test-name item-path state status comment) ;; establish info on incoming test followed by info on top level test ;; BBnote - for mode itemwait, linkage between upstream test & matching item status is propagated to run queue in db:prereqs-not-met ;; (mutex-lock! *db-transaction-mutex*) ;; why do we need a mutex? (let* ((testdat (if (number? test-name) (db:get-test-info-by-id dbstruct run-id test-name) ;; test-name is actually a test-id (db:get-test-info dbstruct run-id test-name item-path))) (test-id (db:test-get-id testdat)) (test-name (if (number? test-name) (db:test-get-testname testdat) test-name)) |
︙ | ︙ | |||
4044 4045 4046 4047 4048 4049 4050 | (loop (+ count 1)) (sqlite3:with-transaction no-sync-db (lambda () (db:no-sync-set no-sync-db rollup-lock-key (current-seconds)) (db:no-sync-del! no-sync-db waiting-lock-key)))))) ;; now the rollup | | | | 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 | (loop (+ count 1)) (sqlite3:with-transaction no-sync-db (lambda () (db:no-sync-set no-sync-db rollup-lock-key (current-seconds)) (db:no-sync-del! no-sync-db waiting-lock-key)))))) ;; now the rollup ;; (mutex-unlock! *db-transaction-mutex*) ;; why do we need a mutex? (if rollup-flag ;; put this into a thread (begin ;; (thread-start! (make-thread ;; (lambda () (db:roll-up-test-state-status dbstruct run-id test-name state status) (db:no-sync-del! no-sync-db rollup-lock-key)) ;; (conc "thread for run-id: " run-id " test-name: " test-name)))))))) )) ;; (mutex-unlock! *db-transaction-mutex*) ;; why do we need a mutex? ))) ;; I'd like to remove the need for item-path - it is logically not needed here ;; for now we pass in state and status - NOTE: There is a possible race if a test ;; is rapidly re-run while an earlier run is waiting to rollup. ;; (define (db:roll-up-test-state-status dbstruct run-id test-name state status) |
︙ | ︙ |