Date: Tuesday, February 6, 2007 @ 17:22:48
Author: marc
Path: /cvsroot/carob/carob/src
Modified: Connection.cpp (1.108 -> 1.109)
Now assuming in FO_CATCH_NTIMES that connection is corrupted for every
DriverException caught, and closing it. Partial fix for CAROB-124:
leaves closed connection behind instead of corrupted one.
----------------+
Connection.cpp | 12 ++++++++++++
1 files changed, 12 insertions(+)
Index: carob/src/Connection.cpp
diff -u carob/src/Connection.cpp:1.108 carob/src/Connection.cpp:1.109
--- carob/src/Connection.cpp:1.108 Tue Feb 6 12:35:08 2007
+++ carob/src/Connection.cpp Tue Feb 6 17:22:48 2007
@@ -62,6 +62,12 @@
/* Code to monitor will go here */
+// TODO: catching non-socket exceptions should probably be done
+// outside of the retry for loop. Like this we could
+// try to reconnect() after corruptedConnectionClose()
+// WITHOUT trying to re-execute the failed query!
+
+
#define FO_CATCH_NTIMES\
break; /* no exception means success: get out of the retry for loop */\
}\
@@ -74,6 +80,12 @@
{\
corruptedConnectionClose(pe); throw; /* TODO: type rethrown? */ \
}\
+ catch (const DriverException& pe)\
+ { /* If carob has locally created an exception while communicating \
+ with the controller, then the connection is very likely to be
+ corrupted */ \
+ corruptedConnectionClose(pe); throw; \
+ }\
catch (const UnexpectedException& ue) /* because of CAROB-101 */ \
{\
corruptedConnectionClose(ue); throw; \
_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits