393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
|
(let* ((servers (tt:get-server-info-sorted ttdat dbfname))
(ok (cond
((null? servers) #f) ;; not ok
((equal? (list-ref (car servers) 6) ;; compare the servinfofile
(tt-servinf-file ttdat))
(let* ((res (if db-locked-in
#t
(let* ((lockinfo (dbfile:with-no-sync-db
nosyncdbpath
(lambda (db)
(db:no-sync-get-lock db dbfname))))
(success (car lockinfo)))
(if success
(begin
(tt-state-set! ttdat 'running)
(debug:print 0 *default-log-port* "Got server lock for "
dbfname)
(set! db-locked-in #t)
#t)
|
|
|
|
|
<
|
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
|
(let* ((servers (tt:get-server-info-sorted ttdat dbfname))
(ok (cond
((null? servers) #f) ;; not ok
((equal? (list-ref (car servers) 6) ;; compare the servinfofile
(tt-servinf-file ttdat))
(let* ((res (if db-locked-in
#t
(let* ((success (dbfile:with-no-sync-db
nosyncdbpath
(lambda (db)
(db:no-sync-get-lock-with-id db dbfname (tt-servinf-file ttdat))))))
(if success
(begin
(tt-state-set! ttdat 'running)
(debug:print 0 *default-log-port* "Got server lock for "
dbfname)
(set! db-locked-in #t)
#t)
|