I am using MAPI C library to talk to multiple monetdb databases. I cache the connection (struct mapi) to reduce overhead. However if a database/machine restarts then the connection is not usable. How do I determine if a cached connection is usable before actually using it. I have tried mapi_is_connected() and mapi_ping(). But mapi_ping always returns 0 while mapi_is_connected always returns 1. Thansk and Regards, Tapomay. _______________________________________________ users-list mailing list users-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/users-list
On 23-10-2012 00:33:22 -0700, Tapomay Dey wrote:
I am using MAPI C library to talk to multiple monetdb databases.
I cache the connection (struct mapi) to reduce overhead.
However if a database/machine restarts then the connection is not usable.
How do I determine if a cached connection is usable before actually using it.
I have tried mapi_is_connected() and mapi_ping().
But mapi_ping always returns 0 while mapi_is_connected always returns 1.
mapi_ping sends a small query to the server, so if your connection is dead, it should not return MOK. How do you "cache" the connection, and what do you see/observe when the database restarts and you consider the connection "not usable"? Fabian _______________________________________________ users-list mailing list users-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/users-list
participants (2)
-
Fabian Groffen
-
Tapomay Dey