Export to GitHub

nurpawiki - issue #45

Implement DB connection pooling


Posted on Jan 1, 2008 by Happy Lion

There's currently only one DB connection per whole Nurpawiki server.

To avoid concurrency issues in the future, some sort of connection pooling mechanism should be implemented.

A proper fix to this issue will most likely fix also issue 5 and issue 29.

Comment #1

Posted on Jan 1, 2008 by Happy Lion

First stab at it in r322. It's not finished yet, as Nurpawiki module acquires the DB connection twice (nested) and nested connection acquires cannot be served with only one single connection available.

The right way to fix this is not to add more available connection but to modify Nurpawiki module's behaviour so that it doesn't acquire nested connections.

Comment #2

Posted on Jan 1, 2008 by Happy Lion

Last change in r326 for now. The pool of connections is actually just a single connection + a mutex to sequentialize concurrent acccess to it.

One connection is probably enough for now, especially as issue 5 is not done yet.

Should re-visit this bug if there ever seems to be a performane problem related to DB accesses.

Status: Fixed

Labels:
Type-Defect Priority-Medium Milestone-Release1.1 Component-Persistence