Changeset: 3c5a4b4d0a25 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3c5a4b4d0a25
Modified Files:
        tools/merovingian/ChangeLog.Apr2012
        tools/merovingian/daemon/forkmserver.c
Branch: Apr2012
Log Message:

mfunnel: refresh sabdb after starting the funnel thread

The sabdb struct was not updated to include the connection and scenario,
hence merovingian believed no connections where available.  Refresh the
struct to get up-to-date information.


diffs (31 lines):

diff --git a/tools/merovingian/ChangeLog.Apr2012 
b/tools/merovingian/ChangeLog.Apr2012
--- a/tools/merovingian/ChangeLog.Apr2012
+++ b/tools/merovingian/ChangeLog.Apr2012
@@ -1,3 +1,7 @@
 # ChangeLog file for sql/src/backends/monet5/merovingian
 # This file is updated with mchangelog
 
+* Tue May 15 2012 Fabian Groffen <[email protected]>
+- Fixed a bug where connecting to a stopped multiplex-funnel would result
+  in a 'there are no available connections' error.
+
diff --git a/tools/merovingian/daemon/forkmserver.c 
b/tools/merovingian/daemon/forkmserver.c
--- a/tools/merovingian/daemon/forkmserver.c
+++ b/tools/merovingian/daemon/forkmserver.c
@@ -187,6 +187,16 @@ forkMserver(char *database, sabdb** stat
                        return(er);
                }
 
+               /* refresh stats, now we will have a connection registered */
+               msab_freeStatus(stats);
+               er = msab_getStatus(stats, database);
+               if (er != NULL) {
+                       /* since the client mserver lives its own life anyway,
+                        * it's not really a problem we exit here */
+                       err e = newErr("%s", er);
+                       free(er);
+                       return(e);
+               }
                return(NO_ERR);
        }
 
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to