[Date Prev][Date Next]
(ITS#7638) Handle connection loss in SQL backend
Full_Name: Pierre Schweitzer
Submission from: (NULL) (188.8.131.52)
here is a patch to handle a possible connection loss to DBMS for the SQL
backend. Right now, in case of connection loss, slapd just denied any entry
lookup with an error 80 (backend error).
With this patch, before preparing any req on the given connection handle, the
backend will first try to check whether the connection is active by issue a
dummy query. In case it's not, it will close the previous connection and open a
new one. And then, will prepare the req on the connection link.
I made this choice of developement because, preparing statement, executing it
and then, only looking whether it fails to re-submit would have been more
complex, since it would have required to start over the whole process for the
query (statement preparation and such) while preparation & execution aren't not
in the same function.
This patch has been tested and validated in production on the ReactOS Foundation
The attached patch file is derived from OpenLDAP Software. All of the
modifications to OpenLDAP Software represented in the following patch(es) were
developed by Pierre Schweitzer (email@example.com). I have not assigned rights
and/or interest in this work to any party.
I, Pierre Schweitzer, hereby place the following modifications to OpenLDAP
Software (and only these modifications) into the public domain. Hence, these
modifications may be freely used and/or redistributed for any purpose with or
without attribution and/or other notice.