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

Ian Eslick eslick at media.mit.edu
Fri Dec 12 00:44:51 UTC 2008


Take a peek at the issues around sharing a DB environment in the BDB  
docs and look at the open-controller args and see where you get.  I  
won't be able to look into this for a few days but can answer the  
occasional question (probably best to e-mail me offline of the mailing  
list until we resolve this.

Be great if anyone else has hacked through this, though.  We should  
document the assumptions.

Ian

On Dec 11, 2008, at 6:03 PM, Yarek Kowalik wrote:

> 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
>
>
> _______________________________________________
> elephant-devel site list
> elephant-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/elephant-devel





More information about the elephant-devel mailing list