From ocorrain at gmail.com Tue Sep 8 19:51:38 2009 From: ocorrain at gmail.com (Tiarnan O'Corrain) Date: Tue, 8 Sep 2009 20:51:38 +0100 Subject: [elephant-devel] get-instance-by-class etc Message-ID: Hi-- the get-instance* functions don't take a store-controller argument. What's the recommended way of directing these to the appropriate store where many may be open? regards Tiarn?n -- The law, in its majestic equality, forbids the rich as well as the poor to sleep under bridges, to beg in the streets, and to steal bread -- Anatole France From sky at viridian-project.de Wed Sep 9 06:45:17 2009 From: sky at viridian-project.de (Leslie P. Polzer) Date: Wed, 9 Sep 2009 08:45:17 +0200 Subject: [elephant-devel] get-instance-by-class etc In-Reply-To: References: Message-ID: <20090909064517.GA17428@viridian-project.de> On Tue, Sep 08, 2009 at 08:51:38PM +0100, Tiarnan O'Corrain wrote: > the get-instance* functions don't take a store-controller argument. > What's the recommended way of directing these to the appropriate store > where many may be open? (let ((*store-controller* my-store-controller)) (get-instance...)) Leslie From eslick at media.mit.edu Wed Sep 9 20:06:10 2009 From: eslick at media.mit.edu (Ian Eslick) Date: Wed, 9 Sep 2009 13:06:10 -0700 Subject: [elephant-devel] get-instance-by-class etc In-Reply-To: <20090909064517.GA17428@viridian-project.de> References: <20090909064517.GA17428@viridian-project.de> Message-ID: <49A8218E-EEEB-487B-8443-1B3DAF82F421@media.mit.edu> Sounds like an opportunity for a cute little macro... (defmacro with-store ((store) &body body) `(let ((*store-controller* ,store)) (declare (special *store-controller*)) , at body)) which is now in the current dev tree. There is also the with-open-store macro which will open and close the store around the body On Sep 8, 2009, at 11:45 PM, Leslie P. Polzer wrote: > On Tue, Sep 08, 2009 at 08:51:38PM +0100, Tiarnan O'Corrain wrote: > >> the get-instance* functions don't take a store-controller argument. >> What's the recommended way of directing these to the appropriate >> store >> where many may be open? > > (let ((*store-controller* my-store-controller)) > (get-instance...)) > > Leslie > > _______________________________________________ > elephant-devel site list > elephant-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/elephant-devel From eslick at media.mit.edu Wed Sep 9 20:41:24 2009 From: eslick at media.mit.edu (Ian Eslick) Date: Wed, 9 Sep 2009 13:41:24 -0700 Subject: [elephant-devel] Deferred schema sync In-Reply-To: References: Message-ID: <5791199B-0D53-4A83-BB48-1771C2D397FE@media.mit.edu> Hi Leslie, The policies here have been a thorn in the design for some time. The first version of schema sync provided lots of configuration options for sync policies, the second tried to provide a clean default policy; but I have also had this redefine before open sync problem. The idea is that the code should be the master and should update the DB when the DB is connected. This would mean a walk of the class schema table and checking if there is anything in memory already which it should sync to. This should be configurable for anyone doing the with-open-store approach to opening/closing stores frequently (a rare model, I believe). However, we want lots of seat belts for the 'code as master' model as a redefinition that drops or renames a slot should never drop data (this is working now, correct?). Ian On Aug 4, 2009, at 11:28 AM, Leslie P. Polzer wrote: > > (open-store *testbdb-spec*) > > (defpclass foobar () ()) > > (make-instance 'foobar) > > (close-store) > > (defpclass foobar () > ((slot :accessor slot :initform nil)) > (:index t)) > > (open-store *testbdb-spec*) > > (describe (car (get-instances-by-class 'foobar))) > > # > [standard-object] > > Slots with :DATABASE allocation: > SLOT = # > Slots with :INSTANCE allocation: > OID = 2 > SPEC = (:BDB "/home/sky/mystic/packages/elephant-1.0/tests/testdb/") > > (defpclass foobar () > ((slot :accessor slot :initform nil)) > (:index t)) > > Synchronizing FOOBAR in ... > # > > > Bottom line: class schemas changed while a store is closed > won't sync when that store is opened later. > > There are several ways to approach this. We could just sync > all db classes when a store is opened or take note of which > redefined classes have synced to which stores. > > Opinions? > > Leslie > > -- > http://www.linkedin.com/in/polzer > > > _______________________________________________ > elephant-devel site list > elephant-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/elephant-devel From ddp at electric-loft.org Sun Sep 20 00:09:11 2009 From: ddp at electric-loft.org (Derrell Piper) Date: Sat, 19 Sep 2009 17:09:11 -0700 Subject: [elephant-devel] problems w/ ClozureCL Message-ID: <94C9DDC3-AE87-4B1F-AF18-95AAF4AC74BA@electric-loft.org> Hi, Configuration: Mac OS X, 10.6.1 (Snow Leopard) Clozure CL: trunk (1.4 via svn), X86-64 Elephant: trunk (1.0 via darcs) Also, FYI, SBCL (trunk) is working fine. Two issues. First, trying to do a '(use-package :elephant)' results in the following: Using # in # would cause name conflicts with symbols already present in that package: BTREE ELEPHANT:BTREE STORE-CONTROLLER ELEPHANT:STORE-CONTROLLER *DEFAULT-RETRIES* ELEPHANT:*DEFAULT-RETRIES* *STORE-CONTROLLER* ELEPHANT:*STORE-CONTROLLER* Second, the bdb tests are not clean: Did 501 checks. Pass: 477 (95%) Skip: 0 ( 0%) Fail: 24 ( 4%) Failure Details: -------------------------------- INDEXING-RANGE []: Unexpected Error: # There is no applicable method for the generic function: # when called with arguments: (NIL).. -------------------------------- -------------------------------- INDEXING-RANGE-SIMPLE []: Unexpected Error: # There is no applicable method for the generic function: # when called with arguments: (NIL).. -------------------------------- -------------------------------- INDEXING-MIXED []: (LENGTH (GET-INSTANCES-BY-VALUE 'IDX-ONE-F 'SLOT1 N)) evaluated to 6, which is not = to 2.. -------------------------------- -------------------------------- INDEXING-MIXED []: (LENGTH (GET-INSTANCES-BY-VALUE 'IDX-ONE-F 'SLOT1 (PRINC-TO- STRING N))) evaluated to 2, which is not = to 1.. -------------------------------- -------------------------------- LARGER-INDEXING-WITH-STRING []: (LENGTH (GET-INSTANCES-BY-VALUE 'IDX-ONE-D 'SLOT1 "2")) evaluated to 30, which is not = to 10.. -------------------------------- -------------------------------- LARGER-INDEXING-WITH-STRING []: (LENGTH (GET-INSTANCES-BY-VALUE 'IDX-ONE-D 'SLOT1 "8")) evaluated to 30, which is not = to 10.. -------------------------------- -------------------------------- LARGER-INDEXING-WITH-STRING []: (LENGTH (GET-INSTANCES-BY-VALUE 'IDX-ONE-D 'SLOT1 "0")) evaluated to 30, which is not = to 10.. -------------------------------- -------------------------------- LARGER-INDEXING-WITH-STRING []: (FIRST INSTANCES) evaluated to #, which is not EQUAL to NIL.. -------------------------------- -------------------------------- LARGER-INDEXING-WITH-STRING []: (ELT INSTANCES 10) evaluated to #, which is not EQUAL to NIL.. -------------------------------- -------------------------------- INDEXING-BASIC []: (LENGTH (GET-INSTANCES-BY-VALUE 'IDX-ONE-F 'SLOT1 N)) evaluated to 6, which is not = to 2.. -------------------------------- -------------------------------- INDEXING-BASIC []: (LENGTH (GET-INSTANCES-BY-RANGE 'IDX-ONE-F 'SLOT1 N (+ 1 N))) evaluated to 7, which is not = to 3.. -------------------------------- -------------------------------- INDEXING-BASIC-WITH-STRING []: (LENGTH (GET-INSTANCES-BY-VALUE 'IDX-ONE-B 'SLOT1 "one")) evaluated to 6, which is not = to 2.. -------------------------------- -------------------------------- INDEXING-BASIC-WITH-STRING []: (LIST INST2) evaluated to (#), which is not EQUAL to (NIL NIL #).. -------------------------------- -------------------------------- INDEXING-WITH-DUPSTUFF-BASIC []: (LENGTH (GET-INSTANCES-BY-VALUE 'IDX-ONE-F 'SLOT1 N)) evaluated to 6, which is not = to 2.. -------------------------------- -------------------------------- LARGER-INDEXING []: (LENGTH (GET-INSTANCES-BY-VALUE 'IDX-ONE-C 'SLOT1 2)) evaluated to 30, which is not = to 10.. -------------------------------- -------------------------------- LARGER-INDEXING []: (LENGTH (GET-INSTANCES-BY-VALUE 'IDX-ONE-C 'SLOT1 8)) evaluated to 30, which is not = to 10.. -------------------------------- -------------------------------- LARGER-INDEXING []: (LENGTH (GET-INSTANCES-BY-VALUE 'IDX-ONE-C 'SLOT1 0)) evaluated to 30, which is not = to 10.. -------------------------------- -------------------------------- LARGER-INDEXING []: (FIRST INSTANCES) evaluated to #, which is not EQUAL to NIL.. -------------------------------- -------------------------------- LARGER-INDEXING []: (ELT INSTANCES 10) evaluated to #, which is not EQUAL to NIL.. -------------------------------- -------------------------------- INDEXING-BASIC-WITH-SYMBOL []: (LENGTH (GET-INSTANCES-BY-VALUE 'IDX-ONE-E 'SLOT1 'ONE)) evaluated to 6, which is not = to 2.. -------------------------------- -------------------------------- INDEXING-BASIC-WITH-SYMBOL []: (LENGTH (GET-INSTANCES-BY-VALUE 'IDX-ONE-E 'SLOT1 'TWO)) evaluated to 3, which is not = to 1.. -------------------------------- -------------------------------- INDEXING-BASIC-WITH-SYMBOL []: (LIST INST2) evaluated to (#), which is not EQUAL to (NIL NIL #).. -------------------------------- -------------------------------- INDEXING-HIERARCHY []: Unexpected Error: # There is no applicable method for the generic function: # when called with arguments: (NIL).. -------------------------------- -------------------------------- INDEXING-CHANGE-CLASS []: 1 evaluated to 1, which is not = to 3.. -------------------------------- NIL ELE-TESTS> From eslick at media.mit.edu Sun Sep 20 00:27:37 2009 From: eslick at media.mit.edu (Ian Eslick) Date: Sat, 19 Sep 2009 17:27:37 -0700 Subject: [elephant-devel] problems w/ ClozureCL In-Reply-To: <94C9DDC3-AE87-4B1F-AF18-95AAF4AC74BA@electric-loft.org> References: <94C9DDC3-AE87-4B1F-AF18-95AAF4AC74BA@electric-loft.org> Message-ID: <12AF8663-3D76-432D-8599-38B360110EDA@media.mit.edu> Did you run the clean script before running the tests? I have exactly that configuration locally and use it daily without incident. Also, which BDB version are you using? -Ian On Sep 19, 2009, at 5:09 PM, Derrell Piper wrote: > Hi, > > Configuration: Mac OS X, 10.6.1 (Snow Leopard) > Clozure CL: trunk (1.4 via svn), X86-64 > Elephant: trunk (1.0 via darcs) > > Also, FYI, SBCL (trunk) is working fine. > > Two issues. > > First, trying to do a '(use-package :elephant)' results in the > following: > > Using # in # > would cause name conflicts with symbols already present in that > package: > BTREE ELEPHANT:BTREE > STORE-CONTROLLER ELEPHANT:STORE-CONTROLLER > *DEFAULT-RETRIES* ELEPHANT:*DEFAULT-RETRIES* > *STORE-CONTROLLER* ELEPHANT:*STORE-CONTROLLER* > > Second, the bdb tests are not clean: > > Did 501 checks. > Pass: 477 (95%) > Skip: 0 ( 0%) > Fail: 24 ( 4%) > > Failure Details: > -------------------------------- > INDEXING-RANGE []: > Unexpected Error: # > There is no applicable method for the generic function: > # > when called with arguments: > (NIL).. > -------------------------------- > -------------------------------- > INDEXING-RANGE-SIMPLE []: > Unexpected Error: # > There is no applicable method for the generic function: > # > when called with arguments: > (NIL).. > -------------------------------- > -------------------------------- > INDEXING-MIXED []: > (LENGTH (GET-INSTANCES-BY-VALUE 'IDX-ONE-F 'SLOT1 N)) evaluated > to 6, which is not = to 2.. > -------------------------------- > -------------------------------- > INDEXING-MIXED []: > (LENGTH (GET-INSTANCES-BY-VALUE 'IDX-ONE-F 'SLOT1 (PRINC-TO- > STRING N))) evaluated to 2, which is not = to 1.. > -------------------------------- > -------------------------------- > LARGER-INDEXING-WITH-STRING []: > (LENGTH (GET-INSTANCES-BY-VALUE 'IDX-ONE-D 'SLOT1 "2")) > evaluated to 30, which is not = to 10.. > -------------------------------- > -------------------------------- > LARGER-INDEXING-WITH-STRING []: > (LENGTH (GET-INSTANCES-BY-VALUE 'IDX-ONE-D 'SLOT1 "8")) > evaluated to 30, which is not = to 10.. > -------------------------------- > -------------------------------- > LARGER-INDEXING-WITH-STRING []: > (LENGTH (GET-INSTANCES-BY-VALUE 'IDX-ONE-D 'SLOT1 "0")) > evaluated to 30, which is not = to 10.. > -------------------------------- > -------------------------------- > LARGER-INDEXING-WITH-STRING []: > (FIRST INSTANCES) evaluated to #, which is > not EQUAL to NIL.. > -------------------------------- > -------------------------------- > LARGER-INDEXING-WITH-STRING []: > (ELT INSTANCES 10) evaluated to #, which > is not EQUAL to NIL.. > -------------------------------- > -------------------------------- > INDEXING-BASIC []: > (LENGTH (GET-INSTANCES-BY-VALUE 'IDX-ONE-F 'SLOT1 N)) evaluated > to 6, which is not = to 2.. > -------------------------------- > -------------------------------- > INDEXING-BASIC []: > (LENGTH (GET-INSTANCES-BY-RANGE 'IDX-ONE-F 'SLOT1 N (+ 1 N))) > evaluated to 7, which is not = to 3.. > -------------------------------- > -------------------------------- > INDEXING-BASIC-WITH-STRING []: > (LENGTH (GET-INSTANCES-BY-VALUE 'IDX-ONE-B 'SLOT1 "one")) > evaluated to 6, which is not = to 2.. > -------------------------------- > -------------------------------- > INDEXING-BASIC-WITH-STRING []: > (LIST INST2) evaluated to (#), which is > not EQUAL to (NIL NIL #).. > -------------------------------- > -------------------------------- > INDEXING-WITH-DUPSTUFF-BASIC []: > (LENGTH (GET-INSTANCES-BY-VALUE 'IDX-ONE-F 'SLOT1 N)) evaluated > to 6, which is not = to 2.. > -------------------------------- > -------------------------------- > LARGER-INDEXING []: > (LENGTH (GET-INSTANCES-BY-VALUE 'IDX-ONE-C 'SLOT1 2)) evaluated > to 30, which is not = to 10.. > -------------------------------- > -------------------------------- > LARGER-INDEXING []: > (LENGTH (GET-INSTANCES-BY-VALUE 'IDX-ONE-C 'SLOT1 8)) evaluated > to 30, which is not = to 10.. > -------------------------------- > -------------------------------- > LARGER-INDEXING []: > (LENGTH (GET-INSTANCES-BY-VALUE 'IDX-ONE-C 'SLOT1 0)) evaluated > to 30, which is not = to 10.. > -------------------------------- > -------------------------------- > LARGER-INDEXING []: > (FIRST INSTANCES) evaluated to #, which is > not EQUAL to NIL.. > -------------------------------- > -------------------------------- > LARGER-INDEXING []: > (ELT INSTANCES 10) evaluated to #, which > is not EQUAL to NIL.. > -------------------------------- > -------------------------------- > INDEXING-BASIC-WITH-SYMBOL []: > (LENGTH (GET-INSTANCES-BY-VALUE 'IDX-ONE-E 'SLOT1 'ONE)) > evaluated to 6, which is not = to 2.. > -------------------------------- > -------------------------------- > INDEXING-BASIC-WITH-SYMBOL []: > (LENGTH (GET-INSTANCES-BY-VALUE 'IDX-ONE-E 'SLOT1 'TWO)) > evaluated to 3, which is not = to 1.. > -------------------------------- > -------------------------------- > INDEXING-BASIC-WITH-SYMBOL []: > (LIST INST2) evaluated to (#), which is > not EQUAL to (NIL NIL #).. > -------------------------------- > -------------------------------- > INDEXING-HIERARCHY []: > Unexpected Error: # > There is no applicable method for the generic function: > # > when called with arguments: > (NIL).. > -------------------------------- > -------------------------------- > INDEXING-CHANGE-CLASS []: > 1 evaluated to 1, which is not = to 3.. > -------------------------------- > > NIL > ELE-TESTS> > > _______________________________________________ > elephant-devel site list > elephant-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/elephant-devel From ddp at electric-loft.org Sun Sep 20 16:27:13 2009 From: ddp at electric-loft.org (Derrell Piper) Date: Sun, 20 Sep 2009 09:27:13 -0700 Subject: [elephant-devel] problems w/ ClozureCL In-Reply-To: References: Message-ID: <76F883DE-BFE7-4FDC-A56B-98812C43F6D5@electric-loft.org> Clean script? No, I guess not. Per Section 3.10, I just did this in the REPL: (asdf:operate 'asdf:load-op :elephant-tests) (in-package "ELEPHANT-TESTS") (setq *default-spec* *testbdb-spec*) (do-backend-tests) What clean script are you referring to? My BDB version is 4.6. Thanks, Derrell On Sep 20, 2009, at 9:00 AM, elephant-devel-request at common-lisp.net wrote: > Did you run the clean script before running the tests? I have exactly > that configuration locally and use it daily without incident. Also, > which BDB version are you using? -Ian From eslick at media.mit.edu Sun Sep 20 16:43:46 2009 From: eslick at media.mit.edu (Ian Eslick) Date: Sun, 20 Sep 2009 09:43:46 -0700 Subject: [elephant-devel] problems w/ ClozureCL In-Reply-To: <76F883DE-BFE7-4FDC-A56B-98812C43F6D5@electric-loft.org> References: <76F883DE-BFE7-4FDC-A56B-98812C43F6D5@electric-loft.org> Message-ID: <3CAA12C3-825E-4CDD-BC10-16D0F910A0BC@media.mit.edu> Try BDB 4.7 - it's required for the current dev head. run tests/delscript.sh from tests - it will clean out all the tests databases. It is possible there are some regressions on head which, if you reproduce your errors after running delscript, I'll try to look at this week. Thank you, Ian On Sep 20, 2009, at 9:27 AM, Derrell Piper wrote: > Clean script? No, I guess not. Per Section 3.10, I just did this in > the REPL: > > (asdf:operate 'asdf:load-op :elephant-tests) > (in-package "ELEPHANT-TESTS") > (setq *default-spec* *testbdb-spec*) > (do-backend-tests) > > What clean script are you referring to? My BDB version is 4.6. > > Thanks, > > Derrell > > On Sep 20, 2009, at 9:00 AM, elephant-devel-request at common-lisp.net > wrote: > >> Did you run the clean script before running the tests? I have >> exactly >> that configuration locally and use it daily without incident. Also, >> which BDB version are you using? -Ian > > > _______________________________________________ > elephant-devel site list > elephant-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/elephant-devel From ddp at electric-loft.org Sun Sep 20 18:38:30 2009 From: ddp at electric-loft.org (Derrell Piper) Date: Sun, 20 Sep 2009 11:38:30 -0700 Subject: [elephant-devel] problems w/ ClozureCL In-Reply-To: References: Message-ID: > Try BDB 4.7 - it's required for the current dev head. No change for Clozure but SBCL doesn't seem to like db47. (See below) > run tests/delscript.sh from tests - it will clean out all the tests > databases. It is possible there are some regressions on head which, > if you reproduce your errors after running delscript, I'll try to look > at this week. Also no change. Same tests failing in CCL. Here's SBCL under 4.7 (it ultimately signals SB-KERNEL::UNDEFINED- ALIEN-FUNCTION-ERROR). FYI, I'm using the default MacPorts db46 and db47 ports. All I did to change versions was edit my-config.sexp. Is there anything else I need to do? Thanks, Derrell ; SLIME 2009-09-14 CL-USER> (load "/users/ddp/src/lisp/elephant-1.0/tests/BerkeleyDB- tests") ; loading system definition from ; /Users/ddp/.sbcl/systems/elephant-tests.asd into # ; registering # as ELEPHANT-TESTS ; registering # as ; ELEPHANT-TESTS-BDB ; loading system definition from /Users/ddp/.sbcl/systems/fiveam.asd into ; # ; registering # as FIVEAM ; loading system definition from /Users/ddp/.sbcl/systems/arnesi.asd into ; # ; registering # as ARNESI ; registering # as ARNESI.TEST ; registering # as ; ARNESI.CL-PPCRE-EXTRAS ; registering # as ; ARNESI.SLIME-EXTRAS STYLE-WARNING: Implicitly creating new generic function EFFECTIVE-KEYWORD-NAME. STYLE-WARNING: Implicitly creating new generic function APPLY-LAMBDA/CC. STYLE-WARNING: Implicitly creating new generic function ENABLED-P. STYLE-WARNING: Implicitly creating new generic function LOG.LEVEL. STYLE-WARNING: Implicitly creating new generic function (SETF LOG.LEVEL). STYLE-WARNING: Implicitly creating new generic function COMPILE-TIME-ENABLED-P. STYLE-WARNING: Implicitly creating new generic function LOG.COMPILE-TIME-LEVEL. STYLE-WARNING: Implicitly creating new generic function (SETF LOG.COMPILE-TIME- LEVEL). STYLE-WARNING: Implicitly creating new generic function ENQUEUE. STYLE-WARNING: Implicitly creating new generic function DEQUEUE. STYLE-WARNING: Implicitly creating new generic function PEEK-QUEUE. STYLE-WARNING: Implicitly creating new generic function QUEUE-EMPTY-P. STYLE-WARNING: Implicitly creating new generic function QUEUE-FULL-P. STYLE-WARNING: Implicitly creating new generic function QUEUE-COUNT. STYLE-WARNING: Implicitly creating new generic function RANDOM-QUEUE-ELEMENT. STYLE-WARNING: Implicitly creating new generic function CALL-FOR-ALL-ELEMENTS-WITH-INDEX. STYLE-WARNING: Implicitly creating new generic function GROW-QUEUE. STYLE-WARNING: Implicitly creating new generic function MOVE-TAIL. STYLE-WARNING: Implicitly creating new generic function MOVE-HEAD. STYLE-WARNING: Implicitly creating new generic function QUEUE->LIST. STYLE-WARNING: Implicitly creating new generic function ENQUEUE-OR-MOVE-TO-FRONT. STYLE-WARNING: Implicitly creating new generic function EXPLAIN. STYLE-WARNING: Implicitly creating new generic function RESOLVE-DEPENDENCIES. STYLE-WARNING: Implicitly creating new generic function RUN-TEST-LAMBDA. Attempting to load libmemutil.dylib... Loaded /Users/ddp/src/lisp/elephant-1.0/src/memutil/libmemutil.dylib ; loading system definition from /Users/ddp/.sbcl/systems/ele-bdb.asd into ; # ; in: LAMBDA NIL ; (ELE-BDB-SYSTEM::GET-DB-NAME ELE-BDB-SYSTEM::C) ; ; caught STYLE-WARNING: ; undefined function: GET-DB-NAME ; (ELE-BDB-SYSTEM::LIBRARY-DIRECTORIES ELE-BDB-SYSTEM::C) ; ; caught STYLE-WARNING: ; undefined function: LIBRARY-DIRECTORIES ; ; compilation unit finished ; Undefined functions: ; GET-DB-NAME LIBRARY-DIRECTORIES ; caught 2 STYLE-WARNING conditions ; ; caught STYLE-WARNING: ; undefined function: LIBRARY-DIRECTORIES ; ; compilation unit finished ; Undefined function: ; LIBRARY-DIRECTORIES ; caught 1 STYLE-WARNING condition ; registering # as ELE-BDB Attempting to load libmemutil.dylib... Loaded /Users/ddp/src/lisp/elephant-1.0/src/memutil/libmemutil.dylib Loading /opt/local/lib/db47/libdb-4.7.dylib Attempting to load libberkeley-db.dylib... Loaded /Users/ddp/src/lisp/elephant-1.0/src/db-bdb/libberkeley-db.dylib STYLE-WARNING: Undefined alien: "db_strerr" STYLE-WARNING: Undefined alien: "db_env_cr" STYLE-WARNING: Undefined alien: "db_env_close" STYLE-WARNING: Undefined alien: "db_env_open" STYLE-WARNING: Undefined alien: "db_env_dbremove" STYLE-WARNING: Undefined alien: "db_env_dbrename" STYLE-WARNING: Undefined alien: "db_env_remove" STYLE-WARNING: Undefined alien: "db_env_set_flags" STYLE-WARNING: Undefined alien: "db_env_get_flags" STYLE-WARNING: Undefined alien: "db_env_txn_checkpoint" STYLE-WARNING: Undefined alien: "db_env_set_errfile" STYLE-WARNING: Undefined alien: "db_cr" STYLE-WARNING: Undefined alien: "db_close" STYLE-WARNING: Undefined alien: "db_open" STYLE-WARNING: Undefined alien: "db_remove" STYLE-WARNING: Undefined alien: "db_rename" STYLE-WARNING: Undefined alien: "db_sync" STYLE-WARNING: Undefined alien: "db_truncate" STYLE-WARNING: Undefined alien: "db_set_flags" STYLE-WARNING: Undefined alien: "db_get_flags" STYLE-WARNING: Undefined alien: "db_get_raw" STYLE-WARNING: Undefined alien: "db_put_raw" STYLE-WARNING: Undefined alien: "db_del" STYLE-WARNING: Undefined alien: "db_del_kv" STYLE-WARNING: Undefined alien: "db_compact" STYLE-WARNING: Undefined alien: "db_cursor" STYLE-WARNING: Undefined alien: "db_cursor_close" STYLE-WARNING: Undefined alien: "db_cursor_del" STYLE-WARNING: Undefined alien: "db_cursor_dup" STYLE-WARNING: Undefined alien: "db_cursor_get_raw" STYLE-WARNING: Undefined alien: "db_cursor_pget_raw" STYLE-WARNING: Undefined alien: "db_cursor_put_raw" STYLE-WARNING: Undefined alien: "db_txn_begin" STYLE-WARNING: Undefined alien: "db_txn_abort" STYLE-WARNING: Undefined alien: "db_txn_commit" STYLE-WARNING: Undefined alien: "db_txn_id" STYLE-WARNING: Undefined alien: "db_env_lock_id" STYLE-WARNING: Undefined alien: "db_env_lock_id_free" STYLE-WARNING: Undefined alien: "db_env_lock_get" STYLE-WARNING: Undefined alien: "db_env_lock_put" STYLE-WARNING: Undefined alien: "db_env_lock_vec" STYLE-WARNING: Undefined alien: "db_env_set_timeout" STYLE-WARNING: Undefined alien: "db_env_get_timeout" STYLE-WARNING: Undefined alien: "db_env_set_cachesize" STYLE-WARNING: Undefined alien: "db_env_get_cachesize" STYLE-WARNING: Undefined alien: "db_env_set_tx_max" STYLE-WARNING: Undefined alien: "db_env_get_tx_max" STYLE-WARNING: Undefined alien: "db_env_set_lk_max_locks" STYLE-WARNING: Undefined alien: "db_env_get_lk_max_locks" STYLE-WARNING: Undefined alien: "db_env_set_lk_max_objects" STYLE-WARNING: Undefined alien: "db_env_get_lk_max_objects" STYLE-WARNING: Undefined alien: "db_env_set_lk_detect" STYLE-WARNING: Undefined alien: "db_env_get_lk_detect" STYLE-WARNING: Undefined alien: "db_env_lock_detect" STYLE-WARNING: Undefined alien: "db_associate" STYLE-WARNING: Undefined alien: "db_fake_associate" STYLE-WARNING: Undefined alien: "db_set_bt_compare" STYLE-WARNING: Undefined alien: "db_set_lisp_compare" STYLE-WARNING: Undefined alien: "db_set_dup_compare" STYLE-WARNING: Undefined alien: "db_set_lisp_dup_compare" STYLE-WARNING: Undefined alien: "db_set_lisp_dup_key_compare" STYLE-WARNING: Undefined alien: "db_sequence_create2" STYLE-WARNING: Undefined alien: "db_sequence_open" STYLE-WARNING: Undefined alien: "db_sequence_close" STYLE-WARNING: Undefined alien: "db_sequence_get" STYLE-WARNING: Undefined alien: "db_sequence_get_lower" STYLE-WARNING: Undefined alien: "db_sequence_initial_value" STYLE-WARNING: Undefined alien: "db_sequence_remove" STYLE-WARNING: Undefined alien: "db_sequence_set_cachesize" STYLE-WARNING: Undefined alien: "db_sequence_get_cachesize" STYLE-WARNING: Undefined alien: "db_sequence_set_flags" STYLE-WARNING: Undefined alien: "db_sequence_set_range" STYLE-WARNING: Undefined alien: "db_sequence_get_range" STYLE-WARNING: Undefined alien: "next_counter" STYLE-WARNING: Implicitly creating new generic function START-DEADLOCK-DETECTOR. STYLE-WARNING: Implicitly creating new generic function STOP-DEADLOCK-DETECTOR. STYLE-WARNING: Implicitly creating new generic function CHECKPOINT. STYLE-WARNING: Implicitly creating new generic function BUILD-BTREE- INDEX. STYLE-WARNING: Implicitly creating new generic function POPULATE. From reddaly at gmail.com Wed Sep 23 03:08:02 2009 From: reddaly at gmail.com (Red Daly) Date: Tue, 22 Sep 2009 20:08:02 -0700 Subject: [elephant-devel] Class indexes dropped after database restart? Message-ID: I noticed there was a disparity between get-instances-by-class and map-inverted-index. I will let the code speak for itself: BOOKS> (length (ele:map-inverted-index #'(lambda (isbn obj) obj) 'material 'isbn :collect t)) 1945 BOOKS> (length (ele:get-instances-by-class 'material)) 0 BOOKS> (defparameter f (make-instance 'material :title "Fake Book")) F BOOKS> (length (ele:get-instances-by-class 'material)) 1 BOOKS> (length (ele:map-inverted-index #'(lambda (isbn obj) obj) 'material 'isbn :collect t)) 1946 There is a similar problem with the university class. BOOKS> (length (ele:get-instances-by-class 'university)) 0 BOOKS> *stanford-university* # BOOKS> (official-name *stanford-university*) "Stanford University" All of the instances in the database were created in a prior session. Then I shut down the DB and restarted Lisp. Now MAP-CLASS and GET-INSTANCES-BY-CLASS return nil for all classes. It seems like new instances get added to the "class index," but older instances are not found. However, these classes persist in the inverted slot indexes. Can anybody diagnose what's going on? here are the definitions of the classes: (defclass department () ((university :initarg :university :initform nil :accessor department-university :index t) (official-name :initarg :official-name :initform nil :accessor official-name) (common-name :initarg :common-name :initform nil :accessor common-name) (abbreviation :initarg :abbreviation :initform nil :accessor abbreviation :index t)) (:metaclass ele:persistent-metaclass) (:documentation "A department has a bunch of course listings.")) (defclass material () ((title :initarg :title :initform nil :accessor material-title :index t) (authors :initarg :authors :initform nil :accessor material-authors) ;; a list of authors (edition :initarg :edition :initform nil :accessor material-edition) (isbn :initarg :isbn :initform nil :accessor material-isbn :index t) (asin :initarg :asin :initform nil :accessor material-asin :index t :documentation "An Amazon.com identifier that uniquely identifies the material") (image-uri :initarg :image-uri :initform nil :accessor material-image-uri)) (:metaclass ele:persistent-metaclass)) Thanks, Red -------------- next part -------------- An HTML attachment was scrubbed... URL: From reddaly at gmail.com Wed Sep 23 03:41:02 2009 From: reddaly at gmail.com (Red Daly) Date: Tue, 22 Sep 2009 20:41:02 -0700 Subject: [elephant-devel] Class indexes dropped after database restart? In-Reply-To: References: Message-ID: I should also note that I am using the version of elephant from darcs. And I discovered that when the program went down it was due to a segfault (I believe in emacs). However, all instances had been created under many different transactions that did not abort. Here is some more fiddling around: CL-USER> (lisp-implementation-version) "1.0.29.54.rc1" BOOKS> (ele::get-db-schemas *ele-db* 'material) NIL BOOKS> (ele::controller-instance-class-index *ele-db*) # BOOKS> (ele:map-btree #'(lambda (key val) (format t "~S => ~S~%" key val)) (ele::controller-instance-class-index *ele-db*)) 307 => 307 NIL Red On Tue, Sep 22, 2009 at 8:08 PM, Red Daly wrote: > I noticed there was a disparity between get-instances-by-class and > map-inverted-index. I will let the code speak for itself: > > BOOKS> (length (ele:map-inverted-index #'(lambda (isbn obj) obj) 'material > 'isbn :collect > t)) > > 1945 > > BOOKS> (length (ele:get-instances-by-class 'material)) > 0 > BOOKS> (defparameter f (make-instance 'material :title "Fake Book")) > F > > BOOKS> (length (ele:get-instances-by-class 'material)) > 1 > > BOOKS> (length (ele:map-inverted-index #'(lambda (isbn obj) obj) 'material > 'isbn :collect > t)) > > 1946 > > There is a similar problem with the university class. > > BOOKS> (length (ele:get-instances-by-class 'university)) > 0 > BOOKS> *stanford-university* > # oid:204> > > BOOKS> (official-name *stanford-university*) > "Stanford University" > > All of the instances in the database were created in a prior session. Then > I shut down the DB and restarted Lisp. Now MAP-CLASS and > GET-INSTANCES-BY-CLASS return nil for all classes. It seems like new > instances get added to the "class index," but older instances are not > found. However, these classes persist in the inverted slot indexes. Can > anybody diagnose what's going on? > > here are the definitions of the classes: > > (defclass department () > ((university :initarg :university :initform nil :accessor > department-university > :index t) > (official-name :initarg :official-name :initform nil :accessor > official-name) > (common-name :initarg :common-name :initform nil :accessor common-name) > (abbreviation :initarg :abbreviation :initform nil :accessor > abbreviation > :index t)) > (:metaclass ele:persistent-metaclass) > (:documentation "A department has a bunch of course listings.")) > > (defclass material () > ((title :initarg :title :initform nil :accessor material-title > :index t) > (authors :initarg :authors :initform nil :accessor material-authors) ;; > a list of > authors > > (edition :initarg :edition :initform nil :accessor material-edition) > (isbn :initarg :isbn :initform nil :accessor material-isbn > :index t) > (asin :initarg :asin :initform nil :accessor material-asin > :index t > :documentation "An Amazon.com identifier that uniquely identifies > the material") > (image-uri :initarg :image-uri :initform nil :accessor > material-image-uri)) > (:metaclass ele:persistent-metaclass)) > > Thanks, > Red > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sky at viridian-project.de Wed Sep 23 08:28:45 2009 From: sky at viridian-project.de (Leslie P. Polzer) Date: Wed, 23 Sep 2009 10:28:45 +0200 (CEST) Subject: [elephant-devel] Class indexes dropped after database restart? In-Reply-To: References: Message-ID: Hi Red, I don't have much time for volunteer work right now, unfortunately. It would help me if you could provide a ready to run test case along with clear steps to reproduce the problem. Leslie -- http://www.linkedin.com/in/polzer From eslick at media.mit.edu Wed Sep 23 16:50:28 2009 From: eslick at media.mit.edu (Ian Eslick) Date: Wed, 23 Sep 2009 09:50:28 -0700 Subject: [elephant-devel] Class indexes dropped after database restart? In-Reply-To: References: Message-ID: Which darcs repository? There is the old 0.91 release and the new elephant-1.0 branch... Ian On Sep 22, 2009, at 8:41 PM, Red Daly wrote: > I should also note that I am using the version of elephant from > darcs. And I discovered that when the program went down it was due > to a segfault (I believe in emacs). However, all instances had been > created under many different transactions that did not abort. > > Here is some more fiddling around: > > CL-USER> (lisp-implementation-version) > "1.0.29.54.rc1" > BOOKS> (ele::get-db-schemas *ele-db* 'material) > NIL > BOOKS> (ele::controller-instance-class-index *ele-db*) > # > BOOKS> (ele:map-btree #'(lambda (key val) > (format t "~S => ~S~%" key val)) > (ele::controller-instance-class-index *ele-db*)) > 307 => 307 > NIL > > > Red > > On Tue, Sep 22, 2009 at 8:08 PM, Red Daly wrote: > I noticed there was a disparity between get-instances-by-class and > map-inverted-index. I will let the code speak for itself: > > BOOKS> (length (ele:map-inverted-index #'(lambda (isbn obj) obj) > 'material 'isbn :collect t)) > 1945 > BOOKS> (length (ele:get-instances-by-class 'material)) > 0 > BOOKS> (defparameter f (make-instance 'material :title "Fake Book")) > F > BOOKS> (length (ele:get-instances-by-class 'material)) > 1 > BOOKS> (length (ele:map-inverted-index #'(lambda (isbn obj) obj) > 'material 'isbn :collect t)) > 1946 > > There is a similar problem with the university class. > > BOOKS> (length (ele:get-instances-by-class 'university)) > 0 > BOOKS> *stanford-university* > # > BOOKS> (official-name *stanford-university*) > "Stanford University" > > All of the instances in the database were created in a prior > session. Then I shut down the DB and restarted Lisp. Now MAP-CLASS > and GET-INSTANCES-BY-CLASS return nil for all classes. It seems > like new instances get added to the "class index," but older > instances are not found. However, these classes persist in the > inverted slot indexes. Can anybody diagnose what's going on? > > here are the definitions of the classes: > > (defclass department () > ((university :initarg :university :initform nil :accessor > department-university > :index t) > (official-name :initarg :official-name :initform nil :accessor > official-name) > (common-name :initarg :common-name :initform nil :accessor common- > name) > (abbreviation :initarg :abbreviation :initform nil :accessor > abbreviation > :index t)) > (:metaclass ele:persistent-metaclass) > (:documentation "A department has a bunch of course listings.")) > > (defclass material () > ((title :initarg :title :initform nil :accessor material-title > :index t) > (authors :initarg :authors :initform nil :accessor material- > authors) ;; a list of authors > (edition :initarg :edition :initform nil :accessor material- > edition) > (isbn :initarg :isbn :initform nil :accessor material-isbn > :index t) > (asin :initarg :asin :initform nil :accessor material-asin > :index t > :documentation "An Amazon.com identifier that uniquely > identifies the material") > (image-uri :initarg :image-uri :initform nil :accessor material- > image-uri)) > (:metaclass ele:persistent-metaclass)) > > Thanks, > Red > > > _______________________________________________ > elephant-devel site list > elephant-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/elephant-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: From reddaly at gmail.com Wed Sep 23 23:27:41 2009 From: reddaly at gmail.com (Red Daly) Date: Wed, 23 Sep 2009 16:27:41 -0700 Subject: [elephant-devel] Class indexes dropped after database restart? In-Reply-To: References: Message-ID: <4566E50F-AEC0-4930-B5C9-E75A4FB2967D@gmail.com> This is the 1.0 repository. I will see if I can reproduce the problem in a test case. Red On Sep 23, 2009, at 9:50 AM, Ian Eslick wrote: > Which darcs repository? There is the old 0.91 release and the new > elephant-1.0 branch... > > Ian > > On Sep 22, 2009, at 8:41 PM, Red Daly wrote: > >> I should also note that I am using the version of elephant from >> darcs. And I discovered that when the program went down it was due >> to a segfault (I believe in emacs). However, all instances had >> been created under many different transactions that did not abort. >> >> Here is some more fiddling around: >> >> CL-USER> (lisp-implementation-version) >> "1.0.29.54.rc1" >> BOOKS> (ele::get-db-schemas *ele-db* 'material) >> NIL >> BOOKS> (ele::controller-instance-class-index *ele-db*) >> # >> BOOKS> (ele:map-btree #'(lambda (key val) >> (format t "~S => ~S~%" key val)) >> (ele::controller-instance-class-index *ele- >> db*)) >> 307 => 307 >> NIL >> >> >> Red >> >> On Tue, Sep 22, 2009 at 8:08 PM, Red Daly wrote: >> I noticed there was a disparity between get-instances-by-class and >> map-inverted-index. I will let the code speak for itself: >> >> BOOKS> (length (ele:map-inverted-index #'(lambda (isbn obj) obj) >> 'material 'isbn :collect t)) >> 1945 >> BOOKS> (length (ele:get-instances-by-class 'material)) >> 0 >> BOOKS> (defparameter f (make-instance 'material :title "Fake Book")) >> F >> BOOKS> (length (ele:get-instances-by-class 'material)) >> 1 >> BOOKS> (length (ele:map-inverted-index #'(lambda (isbn obj) obj) >> 'material 'isbn :collect t)) >> 1946 >> >> There is a similar problem with the university class. >> >> BOOKS> (length (ele:get-instances-by-class 'university)) >> 0 >> BOOKS> *stanford-university* >> # >> BOOKS> (official-name *stanford-university*) >> "Stanford University" >> >> All of the instances in the database were created in a prior >> session. Then I shut down the DB and restarted Lisp. Now MAP- >> CLASS and GET-INSTANCES-BY-CLASS return nil for all classes. It >> seems like new instances get added to the "class index," but older >> instances are not found. However, these classes persist in the >> inverted slot indexes. Can anybody diagnose what's going on? >> >> here are the definitions of the classes: >> >> (defclass department () >> ((university :initarg :university :initform nil :accessor >> department-university >> :index t) >> (official-name :initarg :official-name :initform nil :accessor >> official-name) >> (common-name :initarg :common-name :initform nil :accessor >> common-name) >> (abbreviation :initarg :abbreviation :initform nil :accessor >> abbreviation >> :index t)) >> (:metaclass ele:persistent-metaclass) >> (:documentation "A department has a bunch of course listings.")) >> >> (defclass material () >> ((title :initarg :title :initform nil :accessor material-title >> :index t) >> (authors :initarg :authors :initform nil :accessor material- >> authors) ;; a list of authors >> (edition :initarg :edition :initform nil :accessor material- >> edition) >> (isbn :initarg :isbn :initform nil :accessor material-isbn >> :index t) >> (asin :initarg :asin :initform nil :accessor material-asin >> :index t >> :documentation "An Amazon.com identifier that uniquely >> identifies the material") >> (image-uri :initarg :image-uri :initform nil :accessor material- >> image-uri)) >> (:metaclass ele:persistent-metaclass)) >> >> Thanks, >> Red >> >> >> _______________________________________________ >> elephant-devel site list >> elephant-devel at common-lisp.net >> http://common-lisp.net/mailman/listinfo/elephant-devel > > _______________________________________________ > elephant-devel site list > elephant-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/elephant-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: