From f4e9170e73cb4bcfa7328422b4ff4f72d1339dd0 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 18 Jul 2021 22:31:41 -0700 Subject: new approach to calling fork(2) in remote Lisp images Drop CAN-PROBABLY-FORK because we now only try to fork(2) in contexts in which there shouldn't ever be any other threads running, apart from Lisp implementation finaliser threads and the like. We no longer need to RESET-DATA-SOURCES before CONTINUE-DEPLOY* because we now only fork(2) in contexts in which *NO-DATA-SOURCES* is t. Signed-off-by: Sean Whitton --- src/data.lisp | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'src/data.lisp') diff --git a/src/data.lisp b/src/data.lisp index d09e4e2..c78784c 100644 --- a/src/data.lisp +++ b/src/data.lisp @@ -330,19 +330,12 @@ new versions of data, to avoid them piling up.")) ((connection connection) (k (eql 'cached-data))) (make-hash-table :test #'equal)) -(defun upload-all-prerequisite-data - (&key (upload-string-data t) (connection *connection*)) +(defun upload-all-prerequisite-data (&optional (connection *connection*)) "Upload all prerequisite data required by the current deployment to the remote cache of the current connection hop, or to the remote cache of CONNECTION. -If UPLOAD-STRING-DATA is false, don't upload items of string data, but -retrieve them from data sources and keep in memory. This is for connection -types which will do something like fork after calling this function. - This is called by implementations of ESTABLISH-CONNECTION which call CONTINUE-DEPLOY* or CONTINUE-DEPLOY*-PROGRAM." - ;; Retrieving & keeping in memory refers to how %GET-DATA stores items of - ;; string data in *STRING-DATA*. (flet ((record-cached-data (iden1 iden2 version) (let ((*connection* connection)) (setf (gethash (cons iden1 iden2) (get-connattr 'cached-data)) @@ -366,11 +359,9 @@ CONTINUE-DEPLOY* or CONTINUE-DEPLOY*-PROGRAM." (or (not highest-remote-version) (version> highest-local-version highest-remote-version))) do (let ((data (funcall thunk))) - (when (or upload-string-data - (not (subtypep (type-of data) 'string-data))) - (connection-clear-data-cache connection iden1 iden2) - (connection-upload connection data) - (record-cached-data iden1 iden2 (data-version data)))) + (connection-clear-data-cache connection iden1 iden2) + (connection-upload connection data) + (record-cached-data iden1 iden2 (data-version data))) else if highest-remote-version do (informat 3 "~&Not uploading ~S | ~S ver ~S as remote has ~S" iden1 iden2 -- cgit v1.2.3