[elephant-devel] Is it safe to use the same elephant store in two different processes?

Yarek Kowalik yarek.kowalik at gmail.com
Thu Dec 11 23:03:36 UTC 2008


I've read section 4.13 in the doc, and it appears that it's possible to use
two processes.  However, when I launch two processes reading the same
database, the first process trows errors (see trace below).

Something is messing up the access/confing for the first process.

I was hoping I would not be running into this problem, since I am running
two processes on purpose: one is running standard HTTP server, the other SSL
for secure longins, etc.  I'm using BDB as a means of communicating the user
login state: the user logs in on SSL side, sets up a pass tokens in the
cookie, redirects to HTTP, and there the server fetches authorisation code
from DB using the token.

THis bug, then, stops me cold.  Please help.

Yarek


Bad type argument:
  BDB-DB-ERROR
   [Condition of type SIMPLE-TYPE-ERROR]

Restarts:
 0: [RETRY] Retry SLIME REPL evaluation request.
 1: [ABORT] Return to SLIME's top level.
 2: [TERMINATE-THREAD] Terminate this thread (#<THREAD "repl-thread" RUNNING
{1002CAA181}>)

Backtrace:
  0: (MAKE-CONDITION BDB-DB-ERROR)[:EXTERNAL]
  1: (ERROR BDB-DB-ERROR)[:EXTERNAL]
  2: ((SB-PCL::FAST-METHOD ELEPHANT::EXECUTE-TRANSACTION
(DB-BDB::BDB-STORE-CONTROLLER T)) ..)[:EXTERNAL]
  3: (ELEPHANT::MAP-BTREE-VALUES #<unavailable lambda list>)
  4: (ELEPHANT::GET-DB-SCHEMAS #<BDB-STORE-CONTROLLER
/home/yarek/lisp/projects/fashion-origami/data/> PRODUCT-SET)
  5: (SB-INT:SIMPLE-EVAL-IN-LEXENV (ELEPHANT::GET-DB-SCHEMAS
(WEBLOCKS-ELEPHANT::ELEPHANT-CONTROLLER *FASHION-ORIGAMI-ELEPHANT-STORE*)
'PRODUCT-SET) #<NULL-LEXENV>)
  6: (SWANK::EVAL-REGION "(elephant::get-db-schemas
(weblocks-elephant::elephant-controller *fashion-origami-elephant-store*)
'product-set)\n")

On Thu, Dec 11, 2008 at 2:36 PM, Yarek Kowalik <yarek.kowalik at gmail.com>wrote:

> I'm guessing it is not... as that's what's causing some of my data
> problems....  I thought BDBs can handle multi-process access.
>
> Yarek
>
>
> On Thu, Dec 11, 2008 at 2:23 PM, Yarek Kowalik <yarek.kowalik at gmail.com>wrote:
>
>> I'm trying to access BDB 4.5 backed elephant store (elephant-unstable)
>> from two different lisp processes using the elephant package.   Is this a
>> safe thing to do?
>>
>> Yarek
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/elephant-devel/attachments/20081211/9f363203/attachment.html>


More information about the elephant-devel mailing list