Megatest

Check-in [f4f12cde04]
Login
Overview
Comment:Minor clean up of local access in rmt.scm
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | matt-db-sync-2 | v1.62-side
Files: files | file ages | folders
SHA1: f4f12cde04c39538e76a8e026e8bf887dc186aee
User & Date: mrwellan on 2016-10-31 10:50:26
Other Links: branch diff | manifest | tags
Context
2016-10-31
13:56
db cache can do a sync to megatest.db if it has write access. The db timestamps are used to minimize burden but this is still likely not a good idea and should be removed. check-in: 12001d6988 user: mrwellan tags: matt-db-sync-2, v1.62-side
10:50
Minor clean up of local access in rmt.scm check-in: f4f12cde04 user: mrwellan tags: matt-db-sync-2, v1.62-side
10:42
Part of the read-only fixes to local access in rmt.scm check-in: ba3d839090 user: mrwellan tags: matt-db-sync-2, v1.62-side
Changes

Modified rmt.scm from [c93ba3276b] to [e2c119edf6].

241
242
243
244
245
246
247
248
249

250
251
252
253
254
255
256
257
241
242
243
244
245
246
247


248

249
250
251
252
253
254
255







-
-
+
-







	 (resdat         (if (not (and read-only qry-is-write))
			     (api:execute-requests dbstruct-local (vector (symbol->string cmd) params))
			     (vector #t '())))
	 (success        (vector-ref resdat 0))
	 (res            (vector-ref resdat 1))
	 (duration       (- (current-milliseconds) start)))
    (if (and read-only qry-is-write)
	(begin
	  (debug:print 0 *default-log-port* "ERROR: attempt to write to read-only database ignored. cmd=" cmd)
        (debug:print 0 *default-log-port* "ERROR: attempt to write to read-only database ignored. cmd=" cmd))
	  ))
    (if (not success)
	(if (> remretries 0)
	    (begin
	      (debug:print-error 0 *default-log-port* "local query failed. Trying again.")
	      (thread-sleep! (/ (random 5000) 1000)) ;; some random delay 
	      (rmt:open-qry-close-locally cmd run-id params remretries: (- remretries 1)))
	    (begin