Changes In Branch inmem-per-run-db-per-run-server Through [1aa5496577] Excluding Merge-Ins
This is equivalent to a diff from 6ce4b508b6 to 1aa5496577
2014-01-25
| ||
22:02 | Merged changes on v1.55 branch check-in: 7a252f8ff4 user: matt tags: inmem-per-run-db-per-run-server | |
2013-12-09
| ||
08:54 | fixed typo check-in: f6c7f13b18 user: mrwellan tags: inmem-per-run-db | |
2013-12-01
| ||
23:06 | Coarse grained migration of accessing server via run-id index into *runremote* check-in: 1aa5496577 user: matt tags: inmem-per-run-db-per-run-server | |
21:28 | Conversion to inmem-per-run-db-per-run-server check-in: 076441b7a6 user: matt tags: inmem-per-run-db-per-run-server | |
2013-11-30
| ||
22:00 | More fixes check-in: 6ce4b508b6 user: matt tags: inmem-per-run-db | |
21:57 | More fixes check-in: 96ae57fada user: matt tags: inmem-per-run-db | |
Modified TODO from [61ddd55e7d] to [249cc9a526].
1 | 1 2 3 4 5 6 7 8 9 10 11 12 | + + - - - + + + + + + + + + | TODO ==== |
Modified api.scm from [a5a1f9f0f0] to [812c718b58].
︙ | |||
69 70 71 72 73 74 75 | 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + | ((general-call) (let ((stmtname (car params)) (run-id (cadr params)) (realparams (cddr params))) (db:with-db dbstruct run-id #t ;; these are all for modifying the db (lambda (db) (db:general-call db stmtname realparams))))) ((sync-inmem->db) (db:sync-touched dbstruct force-sync: #t)) |
︙ |
Modified client.scm from [83cf5c7402] to [42fb14d698].
︙ | |||
48 49 50 51 52 53 54 | 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | - + - + - - - + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - + + + + + | ;; ;; There are two scenarios. ;; 1. We are a test manager and we received *transport-type* and *runremote* via cmdline ;; 2. We are a run tests, list runs or other interactive process and we must figure out ;; *transport-type* and *runremote* from the monitor.db ;; ;; client:setup |
Modified common.scm from [a28c1ed00f] to [9394e2ea81].
︙ | |||
44 45 46 47 48 49 50 | 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | - + + | (define *open-dbs* (vector #f (make-hash-table))) ;; megatestdb run-id-dbs ;; SERVER (define *my-client-signature* #f) (define *transport-type* 'fs) (define *megatest-db* #f) (define *rpc:listener* #f) ;; if set up for server communication this will hold the tcp port |
︙ |
Modified dashboard-tests.scm from [78c574598f] to [0f4d58ff5b].
︙ | |||
138 139 140 141 142 143 144 | 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | - + | ;;====================================================================== ;; Run info panel ;;====================================================================== (define (run-info-panel db keydat testdat runname) (let* ((run-id (db:test-get-run_id testdat)) (rundat (db:get-run-info db run-id)) (header (db:get-header rundat)) |
︙ | |||
460 461 462 463 464 465 466 | 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 | - + | (if (not testdat) (begin (debug:print 2 "ERROR: No test data found for test " test-id ", exiting") (exit 1)) (let* (;; (run-id (if testdat (db:test-get-run_id testdat) #f)) (keydat (if testdat (db:get-key-val-pairs dbstruct run-id) #f)) (rundat (if testdat (db:get-run-info dbstruct run-id) #f)) |
︙ |
Modified db.scm from [2818f0f5b2] to [46374c3bd7].
︙ | |||
168 169 170 171 172 173 174 | 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | - + | (if (not dbexists) (db:initialize-main-db db)) (dbr:dbstruct-set-main! dbstruct db) db)))) ;; Make the dbstruct, setup up auxillary db's and call for main db at least once ;; |
︙ | |||
770 771 772 773 774 775 776 | 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 | - + - + + + + + | (lambda (key) (set! res (cons key res))) (db:get-db dbstruct #f) "SELECT fieldname FROM keys ORDER BY id DESC;"))) (set! *db-keys* res) res))) |
︙ | |||
973 974 975 976 977 978 979 | 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 | - + | runs-info) res)) ;; db:get-runs-by-patt ;; get runs by list of criteria ;; register a test run with the db ;; |
︙ | |||
1011 1012 1013 1014 1015 1016 1017 | 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 | - + | (lambda (a . r) (set! res (cons (list->vector (cons a r)) res))) (db:get-db dbstruct #f) qry-str runnamepatt))) (vector header res))) |
︙ |
Modified db_records.scm from [832e173195] to [8182037580].
︙ | |||
107 108 109 110 111 112 113 | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | - - - - | (define-inline (db:test-set-diskfree! vec val)(vector-set! vec 8 val)) (define-inline (db:test-set-testname! vec val)(vector-set! vec 2 val)) (define-inline (db:test-set-state! vec val)(vector-set! vec 3 val)) (define-inline (db:test-set-status! vec val)(vector-set! vec 4 val)) (define-inline (db:test-set-run_duration! vec val)(vector-set! vec 12 val)) (define-inline (db:test-set-final_logf! vec val)(vector-set! vec 13 val)) |
︙ | |||
207 208 209 210 211 212 213 | 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | - - - | (define-inline (tdb:steps-table-get-runtime vec) (vector-ref vec 4)) (define-inline (tdb:step-stable-set-stepname! vec val)(vector-set! vec 0 val)) (define-inline (tdb:step-stable-set-start! vec val)(vector-set! vec 1 val)) (define-inline (tdb:step-stable-set-end! vec val)(vector-set! vec 2 val)) (define-inline (tdb:step-stable-set-status! vec val)(vector-set! vec 3 val)) (define-inline (tdb:step-stable-set-runtime! vec val)(vector-set! vec 4 val)) |
︙ |
Modified http-transport.scm from [ac12c8febe] to [4896ed585b].
︙ | |||
56 57 58 59 60 61 62 | 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | - + | (set! res adr))) (vector->list (hostinfo-addresses (hostname->hostinfo hostname)))) (string-intersperse (map number->string (u8vector->list (if res res (hostname->ip hostname)))) "."))) |
︙ | |||
139 140 141 142 143 144 145 | 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | - + - + - - - + - - + - - + + | (send-response body: "hey there!\n" headers: '((content-type text/plain)))) ((equal? (uri-path (request-uri (current-request))) '(/ "hey")) (send-response body: "hey there!\n" headers: '((content-type text/plain)))) (else (continue)))))))) |
︙ | |||
371 372 373 374 375 376 377 | 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 | - + - - + + - + - - - - - + - + + + - + + + + + - + - - - + | (thread-start! th1) (thread-start! th2) (thread-join! th1) (thread-terminate! th2) (debug:print-info 11 "got res=" res) res))))) |
︙ | |||
447 448 449 450 451 452 453 | 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 | - + - + - - + - - + + + - + + - + - - - - + + + + + + - - + + + + - + | ;; Check that iface and port have not changed (can happen if server port collides) (mutex-lock! *heartbeat-mutex*) (set! sdat *runremote*) (mutex-unlock! *heartbeat-mutex*) (if (or (not (equal? sdat (list iface port))) |
︙ |
Modified launch.scm from [7c2ca47271] to [01eba87552].
︙ | |||
473 474 475 476 477 478 479 | 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 | - + | ;; ;; All log file links should be stored relative to the top of link path ;; ;; <target> - <testname> [ - <itempath> ] ;; (define (create-work-area run-id run-info keyvals test-id test-src-path disk-path testname itemdat) (let* ((item-path (item-list->path itemdat)) |
︙ |
Modified megatest.scm from [d71e637572] to [29669cf33b].
︙ | |||
28 29 30 31 32 33 34 35 36 37 38 39 40 41 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | + | (declare (uses daemon)) (declare (uses db)) ;; (declare (uses sdb)) ;; (declare (uses filedb)) (declare (uses tdb)) (declare (uses mt)) (declare (uses api)) (declare (uses tasks)) ;; only used for debugging. (define *db* #f) ;; this is only for the repl, do not use in general!!!! (include "common_records.scm") (include "key_records.scm") (include "db_records.scm") (include "run_records.scm") |
︙ | |||
199 200 201 202 203 204 205 206 207 208 209 210 211 212 | 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | + | "-set-state-status" "-debug" ;; for *verbosity* > 2 "-gen-megatest-test" "-override-timeout" "-test-files" ;; -test-paths is for listing all "-load" ;; load and exectute a scheme file "-dumpmode" "-run-id" ) (list "-h" "-version" "-force" "-xterm" "-showkeys" "-show-keys" |
︙ | |||
341 342 343 344 345 346 347 | 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 | - - - + + + + + + + - + + | (if (args:get-arg "-server") ;; Server? Start up here. ;; (let ((tl (setup-for-run)) (transport (or (configf:lookup *configdat* "setup" "transport") |
︙ | |||
381 382 383 384 385 386 387 | 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 | - + - - - + | transport-from-cmdinfo transport-from-config "fs")))) (debug:print 2 "chosen-transport: " chosen-transport " have; config=" transport-from-config ", cmdln=" transport-from-cmdln ", cmdinfo=" transport-from-cmdinfo) (case chosen-transport ((http) (set! *transport-type 'http) |
︙ |
Modified mt.scm from [78f8ad9fdf] to [029729b148].
︙ | |||
35 36 37 38 39 40 41 | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | - + | ;; R U N S ;;====================================================================== ;; runs:get-runs-by-patt ;; get runs by list of criteria ;; register a test run with the db ;; |
︙ |
Modified rmt.scm from [9cfe708307] to [9d09a560ab].
︙ | |||
33 34 35 36 37 38 39 | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | - + + - - + + - + - | ;;====================================================================== ;; S U P P O R T F U N C T I O N S ;;====================================================================== ;; cmd is a symbol ;; vars is a json string encoding the parameters for the call ;; |
︙ | |||
72 73 74 75 76 77 78 | 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | - - + + - - + + - + - - + + - + - + + + - + - - + + - + - + - + - + - + - + + - + + - + - + - + - + - + - + - + + + - + + - + - + - + - + - + - + - + - + - + | ;; ;;====================================================================== ;;====================================================================== ;; M I S C ;;====================================================================== |
︙ | |||
235 236 237 238 239 240 241 | 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 | - - + + - + - - + + - - + + - + - + | ;; If given work area ;; 1. Find the testdat.db file ;; 2. Open the testdat.db file and do the query ;; If not given the work area ;; 1. Do a remote call to get the test path ;; 2. Continue as above ;; |
Modified server.scm from [ddc244d255] to [cb22531b74].
︙ | |||
40 41 42 43 44 45 46 | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | - + - - + + | ;; S E R V E R ;;====================================================================== ;; Call this to start the actual server ;; ;; all routes though here end in exit ... |
︙ | |||
115 116 117 118 119 120 121 | 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | - - + + - + | (let ((pub-socket (vector-ref *runremote* 1))) (send-message pub-socket return-addr send-more: #t) (send-message pub-socket (db:obj->string (vector success/fail query-sig result))))) (else (debug:print 0 "ERROR: unrecognised transport type: " *transport-type*) result))) |
︙ |
Modified tasks.scm from [c9fadd13bc] to [f3fa99f925].
︙ | |||
62 63 64 65 66 67 68 | 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | - - + + | pubport INTEGER, start_time TIMESTAMP, priority INTEGER, state TEXT, mt_version TEXT, heartbeat TIMESTAMP, transport TEXT, |
︙ | |||
89 90 91 92 93 94 95 | 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | - - - + + + + + + + + + + - - - - - - + + + + + + + + + + + - - - - + - - - - - - - - + + + + + + - - - + + - - - - + + + + + - - + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - + + + - - + + - - + - - - - + - - - - + | (define (tasks:hostinfo-get-interface vec) (vector-ref vec 1)) (define (tasks:hostinfo-get-port vec) (vector-ref vec 2)) (define (tasks:hostinfo-get-pubport vec) (vector-ref vec 3)) (define (tasks:hostinfo-get-transport vec) (vector-ref vec 4)) (define (tasks:hostinfo-get-pid vec) (vector-ref vec 5)) (define (tasks:hostinfo-get-hostname vec) (vector-ref vec 6)) |
︙ | |||
169 170 171 172 173 174 175 | 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - + - - - - - + + - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - | (heartbeat-delta 99e9)) (sqlite3:for-each-row (lambda (delta) (set! heartbeat-delta delta)) mdb "SELECT strftime('%s','now')-heartbeat FROM servers WHERE id=?;" server-id) (< heartbeat-delta 10))) |
︙ | |||
285 286 287 288 289 290 291 | 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | - - - - - - - - - - - - | (begin (debug:print-info 1 "Sending signal/term to " pid " on " hostname) (process-signal pid signal/term) ;; local machine, send sig term (thread-sleep! 5) ;; give it five seconds to die peacefully then do a brutal kill (process-signal pid signal/kill)) (debug:print 0 "WARNING: Can't kill frozen server on remote host " hostname)))))) |
︙ |
Modified tests/Makefile from [7520ced67a] to [f03136dea1].
1 2 3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | - - - - - - - - - - + + + + + + + + + + - + | # # run some tests |
︙ |
Added tests/watch-monitor.sh version [408ccfb929].
|