Megatest

Check-in [c0bc542d13]
Login
Overview
Comment:Fixed wrong order in calculation of sync time
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.60
Files: files | file ages | folders
SHA1: c0bc542d13a59fb1b865a616dc579c07c5256d2a
User & Date: matt on 2014-11-16 22:42:58
Other Links: branch diff | manifest | tags
Context
2014-11-17
00:11
Add full exit when server hits issue check-in: 4e923ad188 user: mrwellan tags: v1.60
2014-11-16
22:42
Fixed wrong order in calculation of sync time check-in: c0bc542d13 user: matt tags: v1.60
21:58
Tweaks for testing check-in: afb9cc1df1 user: mrwellan tags: v1.60
Changes

Modified megatest.scm from [521d8a79fe] to [c878a49b04].

295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
       (let ((start-time      (current-seconds))
	     (servers-started (make-hash-table)))
	 (for-each 
	  (lambda (run-id)
	    (mutex-lock! *db-multi-sync-mutex*)
	    (if (hash-table-ref/default *db-local-sync* run-id #f)
		;; (if (> (- start-time last-write) 5) ;; every five seconds
		(let ((sync-time (- (current-seconds) start-time)))
		  (db:multi-db-sync (list run-id) 'new2old)
		  (if (common:low-noise-print 30 "sync new to old")
		      (begin
			(debug:print-info 0 "Sync of newdb to olddb for run-id " run-id " completed in " sync-time " seconds")
			(if (> sync-time 10) ;; took more than ten seconds, start a server for this run
			    (begin
			      (debug:print-info 0 "Sync is taking a long time, start up a server to assist for run " run-id)
			      (server:kind-run run-id)))))
		  (hash-table-delete! *db-local-sync* run-id)))
	    (mutex-unlock! *db-multi-sync-mutex*))







|


|







295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
       (let ((start-time      (current-seconds))
	     (servers-started (make-hash-table)))
	 (for-each 
	  (lambda (run-id)
	    (mutex-lock! *db-multi-sync-mutex*)
	    (if (hash-table-ref/default *db-local-sync* run-id #f)
		;; (if (> (- start-time last-write) 5) ;; every five seconds
		(begin ;; let ((sync-time (- (current-seconds) start-time)))
		  (db:multi-db-sync (list run-id) 'new2old)
		  (if (common:low-noise-print 30 "sync new to old")
		      (let ((sync-time (- (current-seconds) start-time)))
			(debug:print-info 0 "Sync of newdb to olddb for run-id " run-id " completed in " sync-time " seconds")
			(if (> sync-time 10) ;; took more than ten seconds, start a server for this run
			    (begin
			      (debug:print-info 0 "Sync is taking a long time, start up a server to assist for run " run-id)
			      (server:kind-run run-id)))))
		  (hash-table-delete! *db-local-sync* run-id)))
	    (mutex-unlock! *db-multi-sync-mutex*))