[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#5095) back-sql concurrency issues

ando@sys-net.it wrote:
> In this sense I think it's meaningless to share
> handles for write operations based on the client connection.  All in all, the
> same user is always used to access the DB, and access control is done by the
> backend, while there's no guarantee the client will serialize requests.  So a
> separate pool of handles could be maintained and used for write operations only;
> handles wouldn't need to be created all times, they can be reused.  Only, they
> need to be used exclusively by one operation, so that SQLTransact() is only
> called for the specified sequence of operations.  The pool could be fixed size,
> deferring operations when busy, or grow on request.

Actually, there's no need to cache handles based on the connection or
so.  It's better to have connections cached per-thread, to make sure
they can only be used one at a time.


Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Email:   pierangelo.masarati@sys-net.it