[elephant-devel] Upgrading problems

Aslak Gronflaten aslakg at gmail.com
Thu Nov 5 06:58:10 UTC 2009


Hi,

I'm (still) having problems upgrading an existing berkeley 4.6 database from
elephant 0.9 to 1.0 trunk, running sbcl under 32 bit linux.

The problem is that I can't access any persistent classes any more.
I believe the data is still there , and I can access btrees for example, but
a class defined like this f.ex:

(DEFPCLASS USER NIL
  ((USERNAME :ACCESSOR USERNAME :INITARG :USERNAME :INITFORM NIL :INDEX T)
   (PASSWORD :ACCESSOR PASSWORD :INITARG :PASSWORD :INITFORM NIL)
   (FULLNAME :ACCESSOR FULLNAME :INITARG :FULLNAME :INITFORM NIL)
   (EMPLOYEE :ACCESSOR EMPLOYEE :INITARG :EMPLOYEE :INITFORM NIL :INDEX T)
   (E-MAIL :ACCESSOR E-MAIL :INITARG :E-MAIL :INITFORM NIL ))
  (:INDEX T))

Pointing to the same db, (get-instances-by-class 'user) will give me a long
list of users under 0.9, while I get an empty list under 1.0.

If I do a describe on the class under 0.9, I get the following:

#<ELEPHANT:PERSISTENT-METACLASS USER>
  [standard-object]

Class precedence-list: USER, ELEPHANT:PERSISTENT-OBJECT,
                       ELEPHANT:PERSISTENT, STANDARD-OBJECT,
                       SB-PCL::SLOT-OBJECT, T
Direct superclasses: ELEPHANT:PERSISTENT-OBJECT
No subclasses.
Direct slots:
  USERNAME
    Allocation: :DATABASE
    Initargs: :USERNAME
    Readers: USERNAME
    Writers: (SETF USERNAME)
  PASSWORD
    Allocation: :DATABASE
    Initargs: :PASSWORD
    Readers: PASSWORD
    Writers: (SETF PASSWORD)
  FULLNAME
    Allocation: :DATABASE
    Initargs: :FULLNAME
    Readers: FULLNAME
    Writers: (SETF FULLNAME)
  EMPLOYEE
    Allocation: :DATABASE
    Initargs: :EMPLOYEE
    Readers: EMPLOYEE
    Writers: (SETF EMPLOYEE)
  E-MAIL
    Allocation: :DATABASE
    Initargs: :E-MAIL
    Readers: E-MAIL
    Writers: (SETF E-MAIL)

Slots with :INSTANCE allocation:
  %TYPE                        = (CLASS #<ELEPHANT:PERSISTENT-METACLASS
USER>)
  SOURCE                       = #S(SB-C:DEFINITION-SOURCE-LOCATION..
  PLIST                        = NIL
  NAME                         = USER
  CLASS-EQ-SPECIALIZER         = #<SB-PCL::CLASS-EQ-SPECIALIZER {B2F4531}>
  DIRECT-SUPERCLASSES          = (#<ELEPHANT:PERSISTENT-METACLASS
ELEPHANT:PERSISTENT-OBJECT>)
  DIRECT-SUBCLASSES            = NIL
  DIRECT-METHODS               = ((#<STANDARD-METHOD IS-IN-PM (USER)
{14CB5FD9}>..
  %DOCUMENTATION               = NIL
  SAFE-P                       = NIL
  FINALIZED-P                  = T
  %CLASS-PRECEDENCE-LIST       = (#<ELEPHANT:PERSISTENT-METACLASS USER>..
  CPL-AVAILABLE-P              = T
  CAN-PRECEDE-LIST             = (#<BUILT-IN-CLASS T> #<SB-PCL::SLOT-CLASS
SB-PCL::SLOT-OBJECT>..
  INCOMPATIBLE-SUPERCLASS-LIST  = NIL
  WRAPPER                      = #<SB-PCL::WRAPPER
#<ELEPHANT:PERSISTENT-METACLASS USER> {AB187A1}>
  PROTOTYPE                    = NIL
  DIRECT-SLOTS                 =
(#<ELEPHANT::PERSISTENT-DIRECT-SLOT-DEFINITION USERNAME>..
  SLOTS                        =
(#<ELEPHANT::TRANSIENT-EFFECTIVE-SLOT-DEFINITION ELEPHANT::%OID>..
  %PERSISTENT-SLOTS            = ((USERNAME PASSWORD FULLNAME EMPLOYEE
E-MAIL))
  %INDEXED-CLASS               = NIL
  %INDEXING-STATE              = (#INDEXING-RECORD<c: (T) islt: 2 dslt: 0>)
  %INDEX-CACHE                 = #<unbound slot>


While doing the same under 1.0 I get this description (top part is
identical):

Slots with :INSTANCE allocation:
  %TYPE                        = (CLASS #<ELEPHANT:PERSISTENT-METACLASS
USER>)
  SOURCE                       = #S(SB-C:DEFINITION-SOURCE-LOCATION..
  PLIST                        = NIL
  NAME                         = USER
  CLASS-EQ-SPECIALIZER         = #<SB-PCL::CLASS-EQ-SPECIALIZER {B163731}>
  DIRECT-SUPERCLASSES          = (#<ELEPHANT:PERSISTENT-METACLASS
ELEPHANT:PERSISTENT-OBJECT>)
  DIRECT-SUBCLASSES            = NIL
  DIRECT-METHODS               = ((#<STANDARD-METHOD IS-IN-PM (USER)
{B7CA389}>..
  %DOCUMENTATION               = NIL
  SAFE-P                       = NIL
  FINALIZED-P                  = T
  %CLASS-PRECEDENCE-LIST       = (#<ELEPHANT:PERSISTENT-METACLASS USER>..
  CPL-AVAILABLE-P              = T
  CAN-PRECEDE-LIST             = (#<BUILT-IN-CLASS T> #<SB-PCL::SLOT-CLASS
SB-PCL::SLOT-OBJECT>..
  INCOMPATIBLE-SUPERCLASS-LIST  = NIL
  WRAPPER                      = #<SB-PCL::WRAPPER
#<ELEPHANT:PERSISTENT-METACLASS USER> {AEB48C1}>
  PROTOTYPE                    = NIL
  DIRECT-SLOTS                 = (#<ELEPHANT::INDEXED-DIRECT-SLOT-DEFINITION
USERNAME>..
  SLOTS                        =
(#<ELEPHANT::TRANSIENT-EFFECTIVE-SLOT-DEFINITION ELEPHANT::OID>..
  %CLASS-SCHEMA                = #<CLASS-SCHEMA USER>
  %STORE-SCHEMAS               = (((:BDB "/www/intranet/db") . #<DB-SCHEMA
34913 USER (s: NIL p: NIL)>))
  %CLASS-INDEXING              = T
  %CACHE-STYLE                 = :NONE


I don't know the internals , so it's just my gut feeling that doesn't like
the s: nil p: nil  there.  Any ideas on how to find what goes wrong?
I desperately need to upgrade as I keep getting Berkeley DB error #-30975:
DB_RUNRECOVERY: Fatal error, run database recovery  in the running system,
after about a days use.
It started out being a monthly occurance, then weekly, and now the system is
really unstable. I'm hoping that getting to 1.0 will help. Also it would
allow upgrading to db4.7.

Any pointers are most welcome....

-- 
Regards Aslak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/elephant-devel/attachments/20091105/b0287abe/attachment.html>


More information about the elephant-devel mailing list