Documentation
Checks for transaction conflicts and signals a transaction conflict
if necessary. Change the object's status to dirty. If the object is
already dirty, nothing happens.
Source
(defmethod cache-touch-object (object (cache standard-cache))
"Checks for transaction conflicts and signals a transaction conflict
if necessary. Change the object's status to dirty. If the object is
already dirty, nothing happens."
;; This function is called by (SETF SLOT-VALUE-USING-CLASS),
;; SLOT-MAKUNBOUND-USING-CLASS and P-DATA-WRITE.
(let ((object-id (object-id object))
(transaction (current-transaction)))
;; Check for transaction conflict.
(let ((old-transaction
(find-conflicting-transaction object-id cache transaction)))
(when old-transaction
(rucksack-error 'transaction-conflict
:object-id object-id
:new-transaction transaction
:old-transaction old-transaction)))
;;
(unless (transaction-changed-object transaction object-id) ; already dirty
;; Remove object from the 'clean objects' hash table.
;; It would be nice to remove the object from the 'clean' queue too,
;; but that's too expensive. We'll let MAKE-ROOM-IN-CACHE take care
;; of that.
(remhash object-id (objects cache))
;; Let the transaction keep track of the dirty object.
(transaction-touch-object transaction object object-id))))
Source Context