Megatest

Check-in [08314706e4]
Login
Overview
Comment:Lock defaults of tmp for cache and none for dashboard
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.80
Files: files | file ages | folders
SHA1: 08314706e4b80396e55c953257cccaf646c78ae7
User & Date: matt on 2023-05-08 05:23:21
Other Links: branch diff | manifest | tags
Context
2023-05-10
22:34
Cherrypicked several changes from v1.70 check-in: 3ba90485f1 user: mmgraham tags: v1.80
20:33
Patched in the -db2db code and it appears to work fine. check-in: 0131a588a0 user: matt tags: v1.80
2023-05-08
05:23
Lock defaults of tmp for cache and none for dashboard check-in: 08314706e4 user: matt tags: v1.80
2023-05-06
18:11
Added serialize-env back in Makefile. Stabilize ids on init of keys and MEGATEST_VERSION on db creation (from ab0494b4b681fb8fe2729874147a548bcb009fa9) check-in: d06c952405 user: matt tags: v1.80
Changes

Modified dashboard-transport-mode.scm.template from [e339576131] to [a59a3f6e5f].

12
13
14
15
16
17
18
19
20
21
22
;; uncomment this block to test without tcp or inmem
;; (dbfile:sync-method 'none)
;; (dbfile:cache-method 'none)
;; (rmt:transport-mode 'nfs)

;; uncomment this block to test with tcp and inmem
(dbfile:sync-method 'original)
(dbfile:cache-method 'inmem)
(rmt:transport-mode 'nfs)









|



12
13
14
15
16
17
18
19
20
21
22
;; uncomment this block to test without tcp or inmem
;; (dbfile:sync-method 'none)
;; (dbfile:cache-method 'none)
;; (rmt:transport-mode 'nfs)

;; uncomment this block to test with tcp and inmem
(dbfile:sync-method 'original)
(dbfile:cache-method 'none)
(rmt:transport-mode 'nfs)


Modified dbmod.scm from [8d57c4f5bf] to [08a8b4a0ef].

127
128
129
130
131
132
133

134
135
136
137
138
139
140
      (let* ((dbdat (make-dbr:dbdat
		     dbfile: (dbr:dbstruct-dbfile dbstruct)
		     dbh:    (dbr:dbstruct-inmem  dbstruct)
		     )))
	(dbr:dbstruct-dbdat-set! dbstruct dbdat)
	dbdat)))


(define (dbmod:need-on-disk-db-handle)
    (case (dbfile:cache-method)
      ((none tmp) #t)
      ((inmem)
       (case (dbfile:sync-method)
	 ((original) #t)
	 ((attach)   #t) ;; we need it to force creation of the on-disk file - FIXME







>







127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
      (let* ((dbdat (make-dbr:dbdat
		     dbfile: (dbr:dbstruct-dbfile dbstruct)
		     dbh:    (dbr:dbstruct-inmem  dbstruct)
		     )))
	(dbr:dbstruct-dbdat-set! dbstruct dbdat)
	dbdat)))

;; NOT USED?
(define (dbmod:need-on-disk-db-handle)
    (case (dbfile:cache-method)
      ((none tmp) #t)
      ((inmem)
       (case (dbfile:sync-method)
	 ((original) #t)
	 ((attach)   #t) ;; we need it to force creation of the on-disk file - FIXME
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
	 (tmpdir       (conc "/tmp/"(current-user-name)))
	 (tmpdb        (let* ((fname (conc tmpdir"/" (string-translate areapath "/" ".")"-"(current-process-id)"-"dbfname)))
			 (if (not (file-exists? tmpdir))(create-directory tmpdir))
			 ;; check if tmpdb already exists, either delete it or
			 ;; add something to the name
			 fname))
	 (inmem        (dbmod:open-inmem-db init-proc
					    (if (eq? (dbcache-mode) 'inmem)
						#f
						tmpdb)
					    ))
	 (write-access (file-write-access? dbpath))
	 (db           (dbmod:safely-open-db dbfullname init-proc write-access))
	 (tables       (db:sync-all-tables-list keys)))
    (if (not (and (sqlite3:database? inmem)







|







180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
	 (tmpdir       (conc "/tmp/"(current-user-name)))
	 (tmpdb        (let* ((fname (conc tmpdir"/" (string-translate areapath "/" ".")"-"(current-process-id)"-"dbfname)))
			 (if (not (file-exists? tmpdir))(create-directory tmpdir))
			 ;; check if tmpdb already exists, either delete it or
			 ;; add something to the name
			 fname))
	 (inmem        (dbmod:open-inmem-db init-proc
					    (if (eq? (dbfile:cache-method) 'inmem)
						#f
						tmpdb)
					    ))
	 (write-access (file-write-access? dbpath))
	 (db           (dbmod:safely-open-db dbfullname init-proc write-access))
	 (tables       (db:sync-all-tables-list keys)))
    (if (not (and (sqlite3:database? inmem)

Modified transport-mode.scm.template from [7b4174ac3b] to [53e1dc7c9f].

12
13
14
15
16
17
18
19
20
21
22
;; uncomment this block to test without tcp or inmem
;; (dbfile:sync-method 'none)
;; (dbfile:cache-method 'none)
;; (rmt:transport-mode 'nfs)

;; uncomment this block to test with tcp and inmem
(dbfile:sync-method 'original) ;; attach)
(dbfile:cache-method 'inmem)
(rmt:transport-mode 'tcp)









|



12
13
14
15
16
17
18
19
20
21
22
;; uncomment this block to test without tcp or inmem
;; (dbfile:sync-method 'none)
;; (dbfile:cache-method 'none)
;; (rmt:transport-mode 'nfs)

;; uncomment this block to test with tcp and inmem
(dbfile:sync-method 'original) ;; attach)
(dbfile:cache-method 'tmp)
(rmt:transport-mode 'tcp)