Changes In Branch v1.64-coalesced-queries Excluding Merge-Ins
This is equivalent to a diff from 85fa0e2f14 to fd0b9485a3
2017-07-05
| ||
12:32 | added speculative fix to send-receive to address issues seen by Eric Brown in ticket 220402979 check-in: 6890b4c9d0 user: bjbarcla tags: v1.64 | |
2017-07-04
| ||
22:59 | Merged from v1.64 check-in: c269abcad7 user: matt tags: v1.65 | |
09:32 | typos Closed-Leaf check-in: fd0b9485a3 user: matt tags: v1.64-coalesced-queries | |
2017-07-03
| ||
21:46 | small fixes check-in: 948b22f1a9 user: matt tags: v1.64-coalesced-queries | |
2017-06-30
| ||
09:37 | Run sync-to-megatest.db instead of in process sync when sync time exceeds 300 ms. Closed-Leaf check-in: 22e44afa46 user: mrwellan tags: v1.64-external-sync | |
2017-06-29
| ||
23:17 | queued coalesced queries (trying again) check-in: 0a1b205bcf user: matt tags: v1.64-coalesced-queries | |
17:50 | Partial implementation of -keep-records, still some work to do... check-in: c10b954bde user: mrwellan tags: v1.64-keep-records | |
2017-06-28
| ||
14:01 | Added missing schema patch for test_rundat check-in: 85fa0e2f14 user: mrwellan tags: v1.64 | |
2017-06-27
| ||
22:23 | Switched back to doing cleaning out of old records in -cleanup-db and added cleanup of test_rundat and test_steps tables. check-in: 299fe5e984 user: matt tags: v1.64 | |
Modified api.scm from [1f6842e15f] to [e9ddc4ee15].
︙ | |||
112 113 114 115 116 117 118 | 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | - + | )) ;; These are called by the server on recipt of /api calls ;; - keep it simple, only return the actual result of the call, i.e. no meta info here ;; ;; - returns #( flag result ) ;; |
︙ | |||
145 146 147 148 149 150 151 | 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | + + - + | (if writecmd-in-readonly-mode (conc "attempt to run write command "cmd" on a read-only database") (case cmd ;;=============================================== ;; READ/WRITE QUERIES ;;=============================================== ((get-keys-write) (api:queued-request queues 'write params (lambda () |
︙ | |||
320 321 322 323 324 325 326 | 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 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 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 | - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | ;; NB// Runs on the server as part of the server loop ;; (define (api:process-request dbstruct $) ;; the $ is the request vars proc (set! *api-process-request-count* (+ *api-process-request-count* 1)) (let* ((cmd ($ 'cmd)) (paramsj ($ 'params)) (params (db:string->obj paramsj transport: 'http)) ;; incoming data from the POST (or is it a GET?) |
Modified common.scm from [fe27a287b6] to [361eab7cdb].
︙ | |||
124 125 126 127 128 129 130 131 132 133 134 135 136 137 | 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | + - + | ;; (define *server-id* #f) (define *server-info* #f) ;; good candidate for easily convert to non-global (define *time-to-exit* #f) (define *server-run* #t) (define *run-id* #f) (define *server-kind-run* (make-hash-table)) (define *home-host* #f) ;; (define *total-non-write-delay* 0) (define *heartbeat-mutex* (make-mutex)) (define *api-process-request-count* 0) (define *max-api-process-requests* 0) (define *server-overloaded* #f) ;; client |
︙ | |||
163 164 165 166 167 168 169 170 171 172 173 174 175 176 | 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 | + + + + + + + + + + + + + + + | (conndat #f) (transport *transport-type*) (server-timeout (server:get-timeout)) ;; default from server:get-timeout (force-server #f) (ro-mode #f) (ro-mode-checked #f)) ;; flag that indicates we have checked for ro-mode ;; api queued requests structure and global (temporary solution) (defstruct api:queues (enable #f) (dbstruct #f) ;; must be initialized! (mutex (make-mutex)) (readq '()) (writeq '()) (last-read (current-milliseconds)) (last-write (current-milliseconds)) (read-cvar (make-condition-variable "reads")) (write-cvar (make-condition-variable "writes")) ) (define *queues* (make-api:queues enable: #t)) ;; set up the queues for coalescing queries ;; launching and hosts (defstruct host (reachable #f) (last-update 0) (last-used 0) (last-cpuload 1)) |
︙ |
Modified rmt.scm from [54fa717fe0] to [adba1500ac].
︙ | |||
83 84 85 86 87 88 89 | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | - + | ;; DOT MUTEXLOCK -> INIT_RUNREMOTE [label="no remote?"]; ;; DOT INIT_RUNREMOTE -> MUTEXLOCK; ;; ensure we have a record for our connection for given area (if (not runremote) ;; can remove this one. should never get here. (begin (set! *runremote* (make-remote)) (set! runremote *runremote*))) ;; new runremote will come from this on next iteration |
︙ | |||
333 334 335 336 337 338 339 | 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 | - + | (define (rmt:open-qry-close-locally cmd run-id params #!key (remretries 5)) (let* ((qry-is-write (not (member cmd api:read-only-queries))) (db-file-path (db:dbfile-path)) ;; 0)) (dbstruct-local (db:setup #t)) ;; make-dbr:dbstruct path: dbdir local: #t))) (read-only (not (file-write-access? db-file-path))) (start (current-milliseconds)) (resdat (if (not (and read-only qry-is-write)) |
︙ |