On Fri, 02 Jan 2009, Alex Mizrahi wrote:
 HD> I am having trouble reducing the code to a sensible test case that
HD> exhibits the same behaviour. Any suggestions on how I can track this
 HD> down?

what kind of objects do you put in this btree? i think i've seen a problem with upgrading btree object type, it might be related.

I am storing objects of a single persistant class, with 7 slots containing integers or floats, into the btree. The keys are integers. Changing the class to be a standard class does not cange the problem.

what's the structure of your code? do you just get slot's value and read/write
 to btree, or something else?

The btree is created on object creation, and only has key/values inserted and read.

 do you have transactions that are aborted?

No, I have a single transaction (WITH-TRANSACTION) around my test case, and I start with an empty (freshly created) database. I notice however, that a EXECUTE-TRANSACTION is being run for each persistant object I create within the WITH-TRANSACTION body. ELEPHANT:*CURRENT-TRANSACTION* doesn't seem to be bound, so the ENSURE-TRANSACTION wrapping the object creation is calling EXECUTE-TRANSACTION. Attached is a small test case and its output when I run it.

I'm not sure that is causing my problems though, as other code exhibits the same behaviour and runs OK.

 do you have multiple threads?

No, single thread.

Thank you, Alex, for taking the time to help with this.

Hugo

Attachment: elephant-transaction.lisp
Description: Binary data

  0: (ELEPHANT::EXECUTE-TRANSACTION
      #<POSTMODERN-STORE-CONTROLLER (POSTGRESQL 127.0.0.1 testpg duncan )>
      #<FUNCTION (LAMBDA #) {121822ED}> :PARENT NIL :RETRIES 200)
    1: (ELEPHANT:CONTROLLER-START-TRANSACTION
        #<POSTMODERN-STORE-CONTROLLER (POSTGRESQL 127.0.0.1 testpg duncan )>)
    1: ELEPHANT:CONTROLLER-START-TRANSACTION returned
         #<POSTMODERN::TRANSACTION-HANDLE {127C19A9}>
NIL is an external symbol in #<PACKAGE "COMMON-LISP">.
It is a constant; its value is NIL.
    1: (ELEPHANT::EXECUTE-TRANSACTION
        #<POSTMODERN-STORE-CONTROLLER (POSTGRESQL 127.0.0.1 testpg duncan )>
        #<FUNCTION (LAMBDA #) {12182435}> :PARENT NIL :RETRIES 200)
NIL is an external symbol in #<PACKAGE "COMMON-LISP">.
It is a constant; its value is NIL.
    1: ELEPHANT::EXECUTE-TRANSACTION returned
    1: (ELEPHANT:CONTROLLER-COMMIT-TRANSACTION
        #<POSTMODERN-STORE-CONTROLLER (POSTGRESQL 127.0.0.1 testpg duncan )>
        #<POSTMODERN::TRANSACTION-HANDLE {127C19A9}>)
    1: ELEPHANT:CONTROLLER-COMMIT-TRANSACTION returned NIL
  0: ELEPHANT::EXECUTE-TRANSACTION returned
_______________________________________________
elephant-devel site list
elephant-devel@common-lisp.net
http://common-lisp.net/mailman/listinfo/elephant-devel

Reply via email to