"Leslie P. Polzer" <s...@viridian-project.de> writes: > But this one doesn't apply cleanly here:
> You could also make a Darcs patch using "darcs record" followed by > "darcs send -o mypatch", although in the general case I prefer plain > diffs. OK - here's a patch produced as above.
Sat Oct 17 10:28:34 EST 2009 dr.alain.pic...@gmail.com * controller-fix Fix bug in GET-CON to re-open controller with correct initial args. New patches: [controller-fix dr.alain.pic...@gmail.com**20091016232834 Ignore-this: ff65d81ae757c57ea9a122b590eb22e1 Fix bug in GET-CON to re-open controller with correct initial args. ] { hunk ./src/db-bdb/bdb-controller.lisp 4 ;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- ;;; ;;; controller.lisp -- Lisp interface to a Berkeley DB store -;;; +;;; ;;; Initial version 8/26/2004 by Ben Lee ;;; <b...@common-lisp.net> hunk ./src/db-bdb/bdb-controller.lisp 7 -;;; +;;; ;;; part of ;;; ;;; Elephant: an object-oriented database for Common Lisp hunk ./src/db-bdb/bdb-controller.lisp 28 (declaim #-elephant-without-optimize (optimize (speed 3) (safety 1) (space 0) (debug 0))) (defclass bdb-store-controller (store-controller) - ((environment :type (or null pointer-void) + ((environment :type (or null pointer-void) :accessor controller-environment) (metadata :type (or null pointer-void) :accessor controller-metadata) (db :type (or null pointer-void) :accessor controller-db :initform '()) hunk ./src/db-bdb/bdb-controller.lisp 83 (delete-file directory))) (defmethod copy-spec ((type (eql :BDB)) source target) - "BDB copy spec to support automated data store mgmt, + "BDB copy spec to support automated data store mgmt, deletes target and copies source to target." (assert (and (eq (first source) :BDB) (eq (first target) :BDB))) (let ((source-dir (second source)) hunk ./src/db-bdb/bdb-controller.lisp 104 +NULL-CHAR+)))) ;; -;; Open/close +;; Open/close ;; (defmethod open-controller ((sc bdb-store-controller) &key (recover t) hunk ./src/db-bdb/bdb-controller.lisp 108 - (recover-fatal nil) (thread t) (register nil) + (recover-fatal nil) (thread t) (register nil) (deadlock-detect t) (cache-size elephant::*berkeley-db-cachesize*) (max-locks elephant::*berkeley-db-max-locks*) hunk ./src/db-bdb/bdb-controller.lisp 141 ;; Open metadata database (setf (controller-metadata sc) metadata) - (db-open metadata :file "%ELEPHANT" :database "%METADATA" + (db-open metadata :file "%ELEPHANT" :database "%METADATA" :auto-commit t :type DB-BTREE :create t :thread thread :multiversion mvcc) hunk ./src/db-bdb/bdb-controller.lisp 152 ;; Auto upgrade 0 9 2 dbs (when (equal (database-version sc) '(0 9 2)) (set-database-version sc)) - + ;; Set the controller-database-version number (destructuring-bind (maj min inc) (database-version sc) (setf (controller-database-version sc) hunk ./src/db-bdb/bdb-controller.lisp 166 ;; Open slot-value data store (setf (controller-db sc) db) - (db-open db :file "%ELEPHANT" :database "%ELEPHANTDB" + (db-open db :file "%ELEPHANT" :database "%ELEPHANTDB" :auto-commit t :type DB-BTREE :create t :thread thread :read-uncommitted t :multiversion mvcc) hunk ./src/db-bdb/bdb-controller.lisp 173 ;; Standard btrees (setf (controller-btrees sc) btrees) (db-bdb::db-set-lisp-compare btrees (controller-serializer-version sc)) - (db-open btrees :file "%ELEPHANT" :database "%ELEPHANTBTREES" + (db-open btrees :file "%ELEPHANT" :database "%ELEPHANTBTREES" :auto-commit t :type DB-BTREE :create t :thread thread :read-uncommitted t :multiversion mvcc) hunk ./src/db-bdb/bdb-controller.lisp 182 (db-bdb::db-set-lisp-compare indices (controller-serializer-version sc)) (db-bdb::db-set-lisp-dup-key-compare indices (controller-serializer-version sc)) (db-set-flags indices :dup-sort t) - (db-open indices :file "%ELEPHANT" :database "%ELEPHANTINDICES" + (db-open indices :file "%ELEPHANT" :database "%ELEPHANTINDICES" :auto-commit t :type DB-BTREE :create t :thread thread :read-uncommitted t :multiversion mvcc) hunk ./src/db-bdb/bdb-controller.lisp 185 - + (setf (controller-indices-assoc sc) indices-assoc) (db-bdb::db-set-lisp-compare indices-assoc (controller-serializer-version sc)) (db-bdb::db-set-lisp-dup-key-compare indices-assoc (controller-serializer-version sc)) hunk ./src/db-bdb/bdb-controller.lisp 190 (db-set-flags indices-assoc :dup-sort t) - (db-open indices-assoc :file "%ELEPHANT" :database "%ELEPHANTINDICES" + (db-open indices-assoc :file "%ELEPHANT" :database "%ELEPHANTINDICES" :auto-commit t :type DB-UNKNOWN :thread thread :read-uncommitted t :multiversion mvcc) (db-bdb::db-fake-associate btrees indices-assoc :auto-commit t) hunk ./src/db-bdb/bdb-controller.lisp 194 - + ;; Duplicated btrees (setf (controller-dup-btrees sc) dup-btrees) hunk ./src/db-bdb/bdb-controller.lisp 204 (db-open dup-btrees :file "%ELEPHANTDUP" :database "%ELEPHANTDUPS" :auto-commit t :type DB-BTREE :create t :thread thread :read-uncommitted t :multiversion mvcc) - + ;; OIDs (let ((db (db-create env))) (setf (controller-oid-db sc) db) hunk ./src/db-bdb/bdb-controller.lisp 208 - (db-open db :file "%ELEPHANTOID" :database "%ELEPHANTOID" + (db-open db :file "%ELEPHANTOID" :database "%ELEPHANTOID" :auto-commit t :type DB-BTREE :create t :thread thread :multiversion mvcc) (let ((oid-seq (db-sequence-create db))) hunk ./src/db-bdb/bdb-controller.lisp 242 ;; Even the indices is serialized before(in the case that open the <=0.9.1 DB file for the second time), ;; it still can not be unserialized here, because its persistent object's oid ;; does not match the hardcoded one in oid->schema-id, which only work on the DB file - ;; created in release > 0.9.1. + ;; created in release > 0.9.1. (make-instance 'bdb-indexed-btree :from-oid -3 :sc sc :indices (make-hash-table)) (make-instance 'bdb-indexed-btree :from-oid -3 :sc sc))) hunk ./src/db-bdb/bdb-controller.lisp 418 t) ((and (typep time 'number) external-process-p) (assert (typep log '(or string null))) - (let ((process-handle - (launch-background-program + (let ((process-handle + (launch-background-program (second (controller-spec ctrl)) hunk ./src/db-bdb/bdb-controller.lisp 421 - (namestring + (namestring (make-pathname :defaults (get-user-configuration-parameter :berkeley-db-deadlock))) :args `("-a" ,(let ((arg (nth-value 1 (lookup-deadlock-type type)))) (if arg arg (error "Can't propagate deadlock abortion type ~S to db_deadlock." type))) hunk ./src/db-bdb/bdb-controller.lisp 444 :name (format nil "Deadlock detector for ~A" ctrl)))) (setf (controller-deadlock-detect-thread ctrl) thread))) (t (error "Invalid deadlock activation time specifier ~S -- must be either :ON-CONFLICT or a positive number." time))))) - + (defmethod stop-deadlock-detector ((ctrl bdb-store-controller)) (let ((thread (controller-deadlock-detect-thread ctrl)) (pid (controller-deadlock-pid ctrl))) hunk ./src/db-bdb/bdb-controller.lisp 461 ;; ;; Enable program-based checkpointing ;; - + (defmethod checkpoint ((sc bdb-store-controller) &key force (time 0) (log-size 0)) "Forces a checkpoint of the db and flushes the memory pool to disk. Use keywords ':force t' to write the checkpoint under any hunk ./src/db-bdb/bdb-controller.lisp 475 ;; Take advantage of release 4.4's compact storage feature. Feature of BDB only ;; -(defmethod optimize-layout ((ctrl bdb-store-controller) &key start-key stop-key +(defmethod optimize-layout ((ctrl bdb-store-controller) &key start-key stop-key (freelist-only t) (free-space nil) &allow-other-keys) "Tell the data store to optimize and reclaim storage between key values" hunk ./src/db-bdb/bdb-controller.lisp 481 (with-buffer-streams (start stop end) (if (null start-key) - (progn + (progn (db-compact (controller-indices ctrl) nil nil end :transaction +NULL-VOID+) (db-compact (controller-db ctrl) nil nil end :transaction +NULL-VOID+) (db-compact (controller-btrees ctrl) nil nil end :transaction +NULL-VOID+)) hunk ./src/db-bdb/bdb-controller.lisp 504 :free-space free-space :transaction +NULL-VOID+))) (values (deserialize end ctrl)))) - hunk ./src/elephant/controller.lisp 4 ;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- ;;; ;;; controller.lisp -- Lisp interface to a Berkeley DB store -;;; +;;; ;;; Initial version 8/26/2004 by Ben Lee ;;; <b...@common-lisp.net> hunk ./src/elephant/controller.lisp 7 -;;; +;;; ;;; part of ;;; ;;; Elephant: an object-oriented database for Common Lisp hunk ./src/elephant/controller.lisp 41 ) "Tells the main elephant code the tag used in a store spec to refer to a given data store. The second argument is an asdf - dependency list. Entries have the form of + dependency list. Entries have the form of (data-store-type-tag asdf-depends-list") (defvar *elephant-controller-init* (make-hash-table)) hunk ./src/elephant/controller.lisp 94 (defun set-con-spec (spec sc) (ele-with-lock (*dbconnection-lock*) - (setf *dbconnection-spec* + (setf *dbconnection-spec* (acons spec sc *dbconnection-spec*)))) (defun delete-con-spec (spec) hunk ./src/elephant/controller.lisp 107 (cond ((not con) (aif (slow-lookup-con-spec (db-spec instance)) (progn - (setf (db-spec instance) + (setf (db-spec instance) (car (find it *dbconnection-spec* :key #'cdr))) (get-con instance)) hunk ./src/elephant/controller.lisp 110 - (restart-case + (restart-case (signal-controller-lost-error instance) (reopen-controller () :report "Re-open the store controller" hunk ./src/elephant/controller.lisp 114 - (open-controller - (get-controller (db-spec instance))))))) + (let ((controller (get-controller (db-spec instance)))) + (apply #'open-controller controller (controller-opening-args controller))))))) ;; If it's valid and open ((and con (connection-is-indeed-open con)) con) hunk ./src/elephant/controller.lisp 120 ;; If the controller object exists but is closed, reopen - (t (open-controller con))))) + (t + (let ((controller (get-controller (db-spec instance)))) + (apply #'open-controller controller (controller-opening-args controller))))))) (defun get-controller (spec) "This is used by open-store to fetch or open a controller. hunk ./src/elephant/controller.lisp 154 (satisfy-asdf-dependencies (second record)))) (defun satisfy-asdf-dependencies (dep-list) - (mapc #'(lambda (dep) - ;; Only load the first time, after that it's the + (mapc #'(lambda (dep) + ;; Only load the first time, after that it's the ;; users fault if they edit source code (unless (asdf::system-registered-p dep) (asdf:operate 'asdf:load-op dep))) hunk ./src/elephant/controller.lisp 189 :documentation "Data store initialization functions are expected to initialize :spec on the call to make-instance") + (opening-args :type list + :accessor controller-opening-args + :initarg :controller-opening-args + :documentation "List of keyword arguments passed to the + OPEN-STORE function when opening (or re-opening) a controller.") (db-version :type fixnum :accessor controller-database-version :initform 100) hunk ./src/elephant/controller.lisp 198 ;; Generic support for the object, indexing and root protocols - (root :reader controller-root + (root :reader controller-root :documentation "This is an instance of the data store persistent btree. It should have an OID that is fixed in the code and does not change between sessions. Usually hunk ./src/elephant/controller.lisp 213 (schema-classes :accessor controller-schema-classes :initform nil :documentation "Maintains a list of all classes that have a cached schema value so we can shutdown cleanly") (schema-cache-lock :accessor controller-schema-cache-lock :initform (ele-make-fast-lock) - :documentation "Protection for updates to the cache from multiple threads. + :documentation "Protection for updates to the cache from multiple threads. Do not override.") ;; Instance storage (instance-table :reader controller-instance-table hunk ./src/elephant/controller.lisp 221 (instance-class-index :reader controller-instance-class-index :documentation "A reverse map of class id to oid") (instance-cache :accessor controller-instance-cache :initform (make-cache-table :test 'eql) - :documentation + :documentation "This is an instance cache and part of the metaclass protocol. Data stores should not override the default behavior.") hunk ./src/elephant/controller.lisp 231 override.") ;; Root table for all indices (index-table :reader controller-index-table - :documentation + :documentation "This is another root for class indexing that is also a data store specific persistent btree instance with a unique OID that persists between sessions. hunk ./src/elephant/controller.lisp 270 maintains a local cache so we don't do redundant writes and increase contention") (gc-max-oid :accessor controller-max-oid :initform nil - :documentation "We conservatively mark any + :documentation "We conservatively mark any oid created after the GC mark pass starts") (gc-mark-table :accessor controller-mark-table :initform nil :documentation "This keeps track of the mark hunk ./src/elephant/controller.lisp 275 table used by the GC during the GC run")) - (:documentation + (:documentation "Superclass for the data store controller, the main interface to any book-keeping, references to DB handles, the instance cache, btree table creation, counters, locks, the roots (for hunk ./src/elephant/controller.lisp 343 :spec spec)) ;; -;; Controller instance creation +;; Controller instance creation ;; hunk ./src/elephant/controller.lisp 349 (defmethod controller-recreate-instance ((sc store-controller) oid &optional classname) "Called by the deserializer to return an instance" - (handler-case - (progn + (handler-case + (progn ;; Quick test since only the GC deletes object references (awhen (get-cached-instance sc oid) (return-from controller-recreate-instance it)) hunk ./src/elephant/controller.lisp 362 (missing-persistent-instance (e) (unless *return-null-on-missing-instance* (signal e))))) - + ;; ;; Controller instance caching hunk ./src/elephant/controller.lisp 385 (remcache oid (controller-instance-cache sc)))) (defmethod flush-instance-cache ((sc store-controller)) - "Reset the instance cache (flush object lookups). Useful + "Reset the instance cache (flush object lookups). Useful for testing. Does not reclaim existing objects so there will be duplicate instances with identical functionality" (ele-with-lock ((controller-instance-cache-lock sc)) hunk ./src/elephant/controller.lisp 417 (defmethod lookup-schema ((sc store-controller) (class persistent-metaclass)) "Get the latest db class schema from caches, etc." ;; Lookup class cached version - (awhen (get-class-controller-schema sc class) + (awhen (get-class-controller-schema sc class) (when (eq (schema-successor it) nil) (return-from lookup-schema it))) hunk ./src/elephant/controller.lisp 457 (get-controller-schema sc (schema-id db-schema) class))) (defmethod update-controller-schema ((sc store-controller) db-schema &optional update-cache) - "Use this to update the schema version that is on store and in + "Use this to update the schema version that is on store and in all the various caches" (assert (typep db-schema 'db-schema)) (assert (schema-id db-schema)) hunk ./src/elephant/controller.lisp 519 (defmethod database-version :around (sc) "Default version assumption for unmarked databases is 0.6.0. - It is possible to check for 0.5.0 databases, but it is not implemented + It is possible to check for 0.5.0 databases, but it is not implemented now due to the low (none?) number of users still on 0.5.0" (declare (ignorable sc)) (let ((db-version (call-next-method))) hunk ./src/elephant/controller.lisp 560 nil)) (defgeneric upgrade (sc spec) - (:documentation "Given an open store controller from a prior version, + (:documentation "Given an open store controller from a prior version, open a new store specified by spec and migrate the data from the original store to the new one, upgrading it to the latest version")) hunk ./src/elephant/controller.lisp 567 (defmethod upgrade ((sc store-controller) target-spec) (unless (upgradable-p sc) - (error "Cannot upgrade ~A from version ~A to version ~A~%Valid upgrades are:~%~A" + (error "Cannot upgrade ~A from version ~A to version ~A~%Valid upgrades are:~%~A" (controller-spec sc) (database-version sc) *elephant-code-version* hunk ./src/elephant/controller.lisp 572 *elephant-upgrade-table*)) - (warn "Please read the current limitations on migrate-based upgrade in migrate.lisp to ensure your + (warn "Please read the current limitations on migrate-based upgrade in migrate.lisp to ensure your data does not require any unsupported features") (let ((source sc) (target (open-store target-spec))) hunk ./src/elephant/controller.lisp 586 (defmethod initialize-serializer ((sc store-controller)) "Establish serializer version on controller startup. Data stores call this before they need the serializer to be valid and after they enable their database-version - call. If the data store shadows this, it has to keep track of serializer versions + call. If the data store shadows this, it has to keep track of serializer versions associated with the database version that is opened." (cond ((prior-version-p (database-version sc) '(0 6 0)) (setf (controller-serializer-version sc) 1) hunk ./src/elephant/controller.lisp 590 - (setf (controller-serialize sc) + (setf (controller-serialize sc) (intern "SERIALIZE" (find-package :ELEPHANT-SERIALIZER1))) (setf (controller-deserialize sc) (intern "DESERIALIZE" (find-package :ELEPHANT-SERIALIZER1)))) hunk ./src/elephant/controller.lisp 594 - (t + (t (setf (controller-serializer-version sc) 2) hunk ./src/elephant/controller.lisp 596 - (setf (controller-serialize sc) + (setf (controller-serialize sc) (intern "SERIALIZE" (find-package :ELEPHANT-SERIALIZER2))) hunk ./src/elephant/controller.lisp 598 - (setf (controller-deserialize sc) + (setf (controller-deserialize sc) (intern "DESERIALIZE" (find-package :ELEPHANT-SERIALIZER2)))))) ;; hunk ./src/elephant/controller.lisp 602 -;; Handling package changes in legacy databases +;; Handling package changes in legacy databases ;; (defvar *always-convert* nil) hunk ./src/elephant/controller.lisp 608 (defparameter *legacy-symbol-conversions* - '(;; 0.5.0 support + '(;; 0.5.0 support (("elephant" . "bdb-btree") . ("sleepycat" . "bdb-btree")) (("elephant" . "bdb-indexed-btree") . ("sleepycat" . "bdb-indexed-btree")) (("elephant" . "bdb-btree-index") . ("sleepycat" . "bdb-btree-index")))) hunk ./src/elephant/controller.lisp 614 (defun add-symbol-conversion (old-name old-package new-name new-package old-version) - "Users can specify specific symbol conversions on upgrade prior to + "Users can specify specific symbol conversions on upgrade prior to migrating old databases" (declare (ignore old-version)) (push (cons (cons old-name old-package) (cons new-name new-package)) *legacy-symbol-conversions*)) hunk ./src/elephant/controller.lisp 633 ("SLEEPYCAT" . "DB-BDB"))) (defun add-package-conversion (old-package-string new-package-string old-version) - "Users can specify wholesale package name conversions on upgrade + "Users can specify wholesale package name conversions on upgrade prior to migrating old databases" (declare (ignore old-version)) (push (cons old-package-string new-package-string) *legacy-package-conversions*)) hunk ./src/elephant/controller.lisp 666 (intern sname package) (progn (case *no-deserialization-package-found-action* - (:warn + (:warn (warn "Couldn't deserialize package ~A based on symbol ~A's home package ~A. Creating an uninterned symbol" pname sname package-name)) (:error hunk ./src/elephant/controller.lisp 683 ;; ================================================================================ (defgeneric open-controller (sc &key recover recover-fatal thread &allow-other-keys) - (:documentation + (:documentation "Opens the underlying environment and all the necessary database tables. Different data stores may use different keys so all methods should &allow-other-keys. There are three standard hunk ./src/elephant/controller.lisp 696 true.")) (defgeneric close-controller (sc) - (:documentation + (:documentation "Close the db handles and environment. Should be in a state where lisp could be shut down without causing an inconsistent state in the db. Also, the object could be used by hunk ./src/elephant/controller.lisp 716 :key-form 'instance-cidx-keyform)))) (defmethod close-controller :after ((sc store-controller)) - (map-cache (lambda (schema-id schema) + (map-cache (lambda (schema-id schema) (declare (ignore schema)) (handler-case (uncache-controller-schema sc schema-id) hunk ./src/elephant/controller.lisp 753 both on stores (all btrees and persistent slots) and specific btrees")) ;; -;; Low-level support for metaclass protocol +;; Low-level support for metaclass protocol ;; (defgeneric persistent-slot-reader (sc instance name &optional oids-only) hunk ./src/elephant/controller.lisp 757 - (:documentation + (:documentation "Data store specific slot reader function")) (defgeneric persistent-slot-writer (sc new-value instance name) hunk ./src/elephant/controller.lisp 761 - (:documentation + (:documentation "Data store specific slot writer function")) (defgeneric persistent-slot-boundp (sc instance name) hunk ./src/elephant/controller.lisp 776 ;; ================================================================================ ;; ;; CONTROLLER USER API -;; +;; ;; ================================================================================ hunk ./src/elephant/controller.lisp 795 ;; Ensure that parameters are set (initialize-user-parameters) (let ((controller (get-controller spec))) - (apply #'open-controller controller args) + (setf (controller-opening-args controller) args) + (apply #'open-controller controller (controller-opening-args controller)) (if *store-controller* (progn ;; (warn "Store controller already set so was not updated") ;; this was annoying me hunk ./src/elephant/controller.lisp 855 "Test whether a given key is instantiated in the root" (declare (type store-controller sc)) (if (existsp key (controller-root sc)) - t + t nil)) (defun remove-from-root (key &key (sc *store-controller*)) hunk ./src/elephant/controller.lisp 878 where an object should be unreachable, but a reference still exists elsewhere in the DB. On access, the unbound slots should flag an error in the application program. IMPORTANT: - this function does not clear any serialized references still in the db. - Need a migration or GC for that! drop-instances is the user-facing call + this function does not clear any serialized references still in the db. + Need a migration or GC for that! drop-instances is the user-facing call as it implements the proper behavior for indexed classes")) (defmethod drop-instance ((inst persistent-object)) hunk ./src/elephant/controller.lisp 905 (mapc #'drop-instance subset))))) (defun drop-instance-slots (instance) - "A helper function for drop-instance, that deletes the storage of + "A helper function for drop-instance, that deletes the storage of persistent slots of instance from the db" (let ((class (class-of instance))) (loop for slot-def in (class-slots class) hunk ./src/elephant/controller.lisp 940 (defmethod get-ele-property (property &key (sc *store-controller*)) (assert (symbolp property)) - (let ((entry (assoc property - (get-from-root *elephant-properties-label* + (let ((entry (assoc property + (get-from-root *elephant-properties-label* :sc sc)))) (when entry (cdr entry)))) hunk ./src/elephant/gc.lisp 5 ;;; ;;; gc.lisp - A wrapper around the migrate interface to support ;;; stop-and-copy GC at the repository level -;;; +;;; ;;; By Ian Eslick <ieslick at common-lisp.net> ;;; ;;; part of hunk ./src/elephant/gc.lisp 67 (defun setup-gc (sc) ;; Setup the GC state (setf (controller-mark-table sc) (make-btree sc)) - (setf (controller-max-oid sc) + (setf (controller-max-oid sc) (oid (controller-mark-table sc))) (setf (controller-mark-list sc) nil)) hunk ./src/elephant/gc.lisp 147 (declare (ignore step start)) (map-index (lambda (k v pk) (declare (ignore k v)) - (if test + (if test (sweep-debug sc pk) (sweep-instance sc pk))) (controller-instance-class-index sc) hunk ./src/elephant/gc.lisp 270 :collect t))))) (defun all-persistent-collections (sc) - (loop for i from 0 upto 53 + (loop for i from 0 upto 53 when (default-class-id-type i sc) collect (find-class (default-class-id-type i sc)))) hunk ./src/elephant/gc.lisp 310 ;; ;; Walk root: ;; - mark root refs -;; - mark +;; - mark hunk ./src/elephant/gc.lisp 320 ;; NOTE: we need to inhibit any operations on the old controller and ;; redirect them to the new one if other threads are accessing -;; can we do this with a lock in get-con? get-con is used alot, +;; can we do this with a lock in get-con? get-con is used alot, ;; though, so perhaps we should just rely on the user? (defgeneric stop-and-copy-gc (sc &key &allow-other-keys) hunk ./src/elephant/gc.lisp 326 (:documentation "Wrap all the migrate machinery in a simple top-level gc call. This will copy all the data - in the source store to the target store. Accesses to - the store should be inhibited by the user. + in the source store to the target store. Accesses to + the store should be inhibited by the user. mapspec saves on memory space by storing oid->object maps on disk hunk ./src/elephant/gc.lisp 329 - replace-source means to have the resulting spec be the same - as the source using copy-spec. - delete-source means do not keep a backup + replace-source means to have the resulting spec be the same + as the source using copy-spec. + delete-source means do not keep a backup backup means to make a backup with a name derived from the src")) (defmethod stop-and-copy-gc ((src store-controller) &key target mapspec replace-source delete-source backup) hunk ./src/elephant/gc.lisp 347 ;; Primary call to migrate (migrate target src) ;; Cleanup mapspec - (when mapspec + (when mapspec (set-oid-spec nil) (delete-spec (first mapspec) mapspec)) hunk ./src/elephant/gc.lisp 350 - ;; Close + ;; Close (when replace-source (unless (eq src-spec (first target)) (error "Cannot perform replace-source on specs of different types: ~A -> ~A" target src-spec)) hunk ./src/elephant/gc.lisp 365 "Ignore *store-controller*" (initialize-user-parameters) (let ((controller (get-controller spec))) - (open-controller controller) + (apply #'open-controller controller (controller-opening-args controller)) controller)) (defgeneric temp-spec (type spec) } Context: [Fix upgrade-all-memory-instances; weak pointer values may be NIL. Leslie P. Polzer <pol...@gnu.org>**20091013205530 Ignore-this: b617e880774c1768630c94809a973b06 ] [Fix x86 build on Snow Leopard (Chun Tian <binghe.l...@gmail.com>) Leslie P. Polzer <pol...@gnu.org>**20091011081106 Ignore-this: e8e9a997af84e7c1f7e201a0a46d9aca ] [Improve lost controller restart model iesl...@common-lisp.net**20091005012336] [Fix missing store restart and get-con bugs iesl...@common-lisp.net**20091005005104] [Fix or parameterize edge condition warnings and errors iesl...@common-lisp.net**20090921200412] [Add with-store macro for multi-store operations iesl...@common-lisp.net**20090909200653] [DB-BDB: fixed thread read conditional. pol...@gnu.org**20090809081918 Ignore-this: dab554003a90b23f26ca839d150b2f45 ] [Make TRANSACTION-RETRY-COUNT-EXCEEDED inherit from ERROR. Leslie P. Polzer <pol...@gnu.org>**20090805200157 Ignore-this: 704443829e8a64db7494dc6ed9ca1d79 ] [DB-BDB: Support configuring the maximum number of transactions. Leslie P. Polzer <pol...@gnu.org>**20090802173447 Ignore-this: a6107aa93ce22039a7cf094c362da9fd ] [Make WITH-BTREE-CURSOR even more bullet-proof against interrupts. Leslie P. Polzer <pol...@gnu.org>**20090802173323 Ignore-this: 39e87e8f053f054529f8ea8077c3abc7 ] [DB-BDB: allow global defaulting for the custom txn retry wait function. Leslie P. Polzer <pol...@gnu.org>**20090722090405 Ignore-this: 947b5ca817a0c1f34857bb26dd015ad4 ] [Amended message about creating uninterned symbols. Leslie P. Polzer <pol...@gnu.org>**20090731111446 Ignore-this: dcb0555b73a03adefd8be4e1e0a3949e ] [DB-BDB: trivial syntax-only refactoring. Leslie P. Polzer <pol...@gnu.org>**20090726080046 Ignore-this: fb2c512cdf93e3f3ae1a5fa2d6cd31ee ] [memutil: added two FIXMEs concerning async unwind and allocation. Leslie P. Polzer <pol...@gnu.org>**20090726075929 Ignore-this: 5ea639589f6b05e163bf6016e638d8b6 ] [DB-BDB: a few errno buffers weren't freed by berkeley-db.lisp. Use WITH-FOREIGN-ALLOC for them. Leslie P. Polzer <pol...@gnu.org>**20090726075745 Ignore-this: 3cedacf585cbecb9e0b7450f5b7a89a9 ] [DB-BDB: get rid of the "Catch tag 'TRANSACTION does not exist" variety of errors in collections, too. Leslie P. Polzer <pol...@gnu.org>**20090708154501 Ignore-this: f3677195657571a1b2aedf71d25077ee ] [Fix compilation on LW (patch by Chun Tian <binghe.l...@gmail.com>) Leslie P. Polzer <pol...@gnu.org>**20090629084752 Ignore-this: 7a7ce6847d79c0f05818df05ede596b9 ] [DB-POSTMODERN: sb-impl::quick-integer-to-string is gone. Remove the hack and replace the FORMAT instead. Leslie P. Polzer <pol...@gnu.org>**20090627133517 Ignore-this: cecd74326e3f4aa035c21836dfdf1699 ] [Minor fixes to query.lisp. Leslie P. Polzer <pol...@gnu.org>**20090625182229 Ignore-this: 2d5e5d8fcf51bff0d6f8a2f640c81281 ] [Move ENSURE-TRANSACTION bits from last patches to BDB backend; others probably don't need this. Leslie P. Polzer <pol...@gnu.org>**20090625152725 Ignore-this: f8c24a23880db4aa6b90289ae4b6a174 ] [Added another missing ENSURE-TRANSACTION. Leslie P. Polzer <pol...@gnu.org>**20090625141208 Ignore-this: a237fa2acb8d4750c56e1ed7a3c7f51b ] [Ensure that persistent slot reads and writes happen in a txn. Leslie P. Polzer <pol...@gnu.org>**20090625093539 Ignore-this: 50108310b594d079aed78126c2f428d0 ] [Fix bug 'There is no class named X'. Leslie P. Polzer <pol...@gnu.org>**20090620164448 Ignore-this: 6683d442de9b28436e04e518413c05ff This occured under the following conditions: * open store controller * class X is being defined for the first time (notably doesn't exist in store registry) * class X has slots with readers or writers ] [Portably define WITHOUT-INTERRUPTS. Use it to run cursor/transaction creation/deletion with interrupts disabled. Leslie P. Polzer <pol...@gnu.org>**20090620122628 Ignore-this: b6ce8a1838a38e4a323154e3a5983f88 ] [Added PERSISTENT-PROXY contrib. Leslie P. Polzer <pol...@gnu.org>**20090620111923 Ignore-this: 7f344b3bd37335e0b2087049e08eac04 ] [Added some notes on deadlocks to the manual. Leslie P. Polzer <pol...@gnu.org>**20090617110237 Ignore-this: 8dcc20e02b15b12c4b907c709e299eae ] [REBUILD-SLOT-INDICES, SLOT-INDEX-SANE-P: ensure classes are finalized. Leslie P. Polzer <pol...@gnu.org>**20090613140807 Ignore-this: 4a23bd087a20a333693a4f8502736d66 ] [Fixed NIL handling of SLOT-MAKUNBOUND-USING-CLASS for indexed slots and UPDATE-SLOT-INDEX. Add tests for it. Leslie P. Polzer <pol...@gnu.org>**20090613140650 Ignore-this: 6a44ed346cea9d85d5c40ac5260200a0 ] [Add functions to help checking and rebuilding slot indices. Leslie P. Polzer <pol...@gnu.org>**20090613091923 Ignore-this: b32c4d8655dfe7d6a4bc21ee711fc0f8 ] [REBUILD-SLOT-INDEX: handle unbound slots correctly. Leslie P. Polzer <pol...@gnu.org>**20090613091849 Ignore-this: 8135dd3c44c0bf8f08b7c29d005f2012 ] [Add a test case for UPDATE-INSTANCE-SLOT. Leslie P. Polzer <pol...@gnu.org>**20090611102515 Ignore-this: d8ac815c7404aef2fc5864e42d09fcf5 ] [Fix unbound slot handling in CHANGE-INSTANCE-SLOT; add test case for it. Leslie P. Polzer <pol...@gnu.org>**20090611071625 Ignore-this: ff340c39d52b75718d18986b407f5e0b ] [Make deserialization errors inherit from ERROR. Leslie P. Polzer <pol...@gnu.org>**20090610134702 Ignore-this: 7c62a72116a33b44480895c4072302c0 ] [DB-POSTMODERN: fix SB-IMPL usage. Leslie P. Polzer <pol...@gnu.org>**20090610134525 Ignore-this: 2bf1db5d9aa6eb759b4fa6e7b09ae694 ] [Restore original values for concurrency test suite. Leslie P. Polzer <pol...@gnu.org>**20090610103302 Ignore-this: 5567793d79cee5082d728356f6214fa ] [Support custom retry delays (defaulting to 0.1s) and functions. Leslie P. Polzer <pol...@gnu.org>**20090610103228 Ignore-this: fd7797243b56cd97611263177b3b952b ] [Minor amendments to concurrency test suite. Leslie P. Polzer <pol...@gnu.org>**20090610092203 Ignore-this: cb316292d990900a96f2d17fed4c1653 ] [SYNCHRONIZE-STORE-CLASSES: support picking the classes to be synchronized; also ensure that classes are finalized. Leslie P. Polzer <pol...@gnu.org>**20090606094129 Ignore-this: 8502b065dd05503b36d952d0fac00138 ] [Fix/enhance CERROR mechanism for dropped slots. Leslie P. Polzer <pol...@gnu.org>**20090603130600 Ignore-this: 505e7776beeb46a967413fbd2ab5910a ] [synchronize-store-classes: ignore non-existent classes. Leslie P. Polzer <pol...@gnu.org>**20090601151322 Ignore-this: da62f7acff403829a7a79ca46d5464d9 ] [Fix openmcl handling of instance updates on redef. Leslie P. Polzer <pol...@gnu.org>**20090519085457 Ignore-this: a36f363b92a7b81ef2bba98f5ce2bb2d ] [Ensure fresh line for "Synchronizing..." message. Leslie P. Polzer <pol...@gnu.org>**20090504064749 Ignore-this: 9f2d72e901b4a705a5f7ce2f9fbef756 ] [Fix association delete for N:1 endpoints iesl...@common-lisp.net**20090321203319] [Fixed minor paren mismatch in CLP. Elliott Slaughter <elliottslaugh...@gmail.com>**20090216062037 Ignore-this: 633cf8106eb1fdd66b22d51935475205 ] [Fix typos in ccl/openmcl locking patch iesl...@common-lisp.net**20090311202355] [Add locking for ccl/openmcl iesl...@common-lisp.net**20090311202156] [Fix type deser typo bug iesl...@common-lisp.net**20090311195907] [More informative deserialization error reporting iesl...@common-lisp.net**20090311150241] [Refactor slot protocol; MOP fix for ccl iesl...@common-lisp.net**20090303162100] [ClozureCL fixes iesl...@common-lisp.net**20090303153635] [OpenMCL weak pointer fixes iesl...@common-lisp.net**20090225141141] [Support for secondary clp cursors; bugs remain iesl...@common-lisp.net**20090216043228] [Experimental (NOT STABLE) support for part of the cursor API with CLP. Elliott Slaughter <elliottslaugh...@gmail.com>**20090214230838 Implemented most of the cursor API, stopping at the p* cursor functions. With the changes, about 14 more tests pass, although there are still some strange results floating around.... ] [migration-fix-for-1.0A2 ihuq...@gmail.com**20090212110735 0.9.1->1.0 alpha2 migration fails when using SBCL. It is caused by that controller-recreate-instance is recursively called in migration process. It results in a recursive call for sb-thread:with-mutex. The solution is to replace sb-thread:with-mutex by sb-thread:sb-thread:with-recursive-lock. ] [SBCL: ensure that all stores are closed on exit. Leslie P. Polzer <pol...@gnu.org>**20090211084035 Ignore-this: 94be0e62949d9e9ca863aa70eec6a553 ] [Move confusing query folder from src to contrib iesl...@common-lisp.net**20090210192606] [CLP gensym test exception iesl...@common-lisp.net**20090208230446] [Warn on drop data by class redefinition iesl...@common-lisp.net**20090208230424] [Move clsql data store into contrib iesl...@common-lisp.net**20090207213032] [Promote db-clp to standard-issue DB iesl...@common-lisp.net**20090207212641] [Fix serializer bugs on re-opening of store iesl...@common-lisp.net**20090207205919] [Fix RBT empty node bug; fix lost proxy trees bug; fix serializer reopen bug; open/close store works iesl...@common-lisp.net**20090207202356] [More fixes for reopening a store iesl...@common-lisp.net**20090207183403] [Fix clp bugs; partial open-store implementation iesl...@common-lisp.net**20090207181117] [db-postmodern: cursor semantics alex.mizr...@gmail.com**20090205174924] [db-postmodern: hardened type handling alex.mizr...@gmail.com**20090205161017] [tests for mixed-type btrees alex.mizr...@gmail.com**20090205160934] [db-postmodern: btree upgrade handling, btree wrappers. WARNING: incompatible store format! alex.mizr...@gmail.com**20090205160838] [db-postmodern: dup btree value type alex.mizr...@gmail.com**20090205155335] [db-postmodern: proper transaction handling alex.mizr...@gmail.com**20090205155239] [postmodern doc update alex.mizr...@gmail.com**20090205112036] [postmodern documentation update alex.mizr...@gmail.com**20090205111642] [Better support for (:prebuilt-libraries nil) under win32/SBCL. Elliott Slaughter <elliottslaugh...@gmail.com>**20090108090553 Elephant can now build DLLs properly under win32/SBCL, even when stored in a directory whose name contains spaces, or on another drive letter. Also doesn't litter *.o files in the current directory when compiling. ] [Chun Tian's lispworks 5.1 patch iesl...@common-lisp.net**20090203165530] [Fix slot unbound test failures for CLP data store iesl...@common-lisp.net**20090203044202] [Initial db-clp implementation contrib iesl...@common-lisp.net**20090202202857] [Core elephant prep for clp iesl...@common-lisp.net**20090126023824] [Fix fixnum64 declaration bug iesl...@common-lisp.net**20090126171924] [merge conflict resolution 1-26 esl...@common-lisp.net**20090126150411] [Allegro compatabiliity 2 iesl...@common-lisp.net**20090120205655] [Allegro compatibility fixes iesl...@common-lisp.net**20090119223005] [Unify DB-LOCK structures for ccl compilation iesl...@common-lisp.net**20090119211557] [Clean up test ordering for ccl; compatible with openmcl; fix test bug iesl...@common-lisp.net**20090119160831] [Clozure CL support (2 errors left in tests) iesl...@common-lisp.net**20090118234322] [TAG ELEPHANT-1-0-A2 esl...@common-lisp.net**20090113201539] [Clean up memutil fixnum interface iesl...@common-lisp.net**20090113200727] [Association declaration bug iesl...@common-lisp.net**20090113200713] [Clean up serialier use of memutil; bdb condition msg iesl...@common-lisp.net**20090113195939] [Revert sbcl fast locks; add errfile to BDB; improve cache locking iesl...@common-lisp.net**20090113013529] [Fix race condition in caching; add BDB errfile support; minor imprrovements to transaction macro and pset api. iesl...@common-lisp.net**20090112223522] [Ensure that BDB condition is valid during macroexpansion iesl...@common-lisp.net**20090112210529] [Fix testcondition conflicts esl...@common-lisp.net**20090110200538] [Fix transaction inhibit test iesl...@common-lisp.net**20090110004336] [Fixup indexing for clozure; BDB transaction inhibiting bugfix esl...@common-lisp.net**20090110165542] [Fix rollback test iesl...@common-lisp.net**20090110004026] [Performance declarations (not verified on all lisps) iesl...@common-lisp.net**20090109143359] [Fix bug in inhibit-rollback; fix reinit bug on persistent-metaclas iesl...@common-lisp.net**20090109104433] [Remove default register argument enabled for BDB iesl...@common-lisp.net**20090109071045] [Inhibit-rollback option to BDB transactions for arbitrary non-local exits iesl...@common-lisp.net**20090109070733] [Revert some minor changes iesl...@common-lisp.net**20090109035713] [Simple extension to snapshot-set iesl...@common-lisp.net**20090109031720] [Fix duplicate item warning in BDB index writes iesl...@common-lisp.net**20090107153442] [Fix load order and layout for GC subsystem iesl...@common-lisp.net**20090107125806] [Enhance concurrent gc to catch writes during the mark phase iesl...@common-lisp.net**20090107053908] [Change code version to 1.0; optimize symbol interning in serializer iesl...@common-lisp.net**20090107042700] [TAG ELEPHANT-1-0-A1 iesl...@common-lisp.net**20090105234537] Patch bundle hash: 65d7bf41d45aa3de2a1157e84a484084f4cf1c88
_______________________________________________ elephant-devel site list elephant-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/elephant-devel