Hi,

(Perhaps I'm going about this all wrong, but...)

I'm trying to populate a large number of Sleepycat databases.
I've created the necessary underlying directories.
What I'm attempting is something like this:

(defun populate-db (tree data-pairs)
(mapcar #'(lambda (p) (setf (get-value (car p) tree) (cadr p))) data-pairs))

(mapcar #'(lambda (db)
             (with-open-store db
                 (setf btree (make-btree)
                 (add-to-root "tree" btree)
                 (populate-db *btree* list-of-data-pairs)))
        list-of-databases)

I have hundreds of databases, with each database having thousands of data-pairs.

So, after loading up around 150 databases, I get an error from Sleepycat that I've got too many databases open. I *assume* that even though I've wrapped
everything in the "with-open-store" call, the databases are not closing
because I've got a reference to a btree. Is that correct? If so, is there an explicit way I can ensure that each database is closed before I move on to the
next one?

If anyone has alternate suggestions on how I should store this data, feel free to
pass them along.

Thanks,
-kevin

_______________________________________________
elephant-devel site list
elephant-devel@common-lisp.net
http://common-lisp.net/mailman/listinfo/elephant-devel

Reply via email to