Re: Get rid of MCstartMaintenance and MCexitMaintenance.
On 19-09-19 12:00, developers-list-request@monetdb.org wrote:
Send developers-list mailing list submissions to developers-list@monetdb.org
To subscribe or unsubscribe via the World Wide Web, visit https://www.monetdb.org/mailman/listinfo/developers-list or, via email, send a message with subject or body 'help' to developers-list-request@monetdb.org
You can reach the person managing the list at developers-list-owner@monetdb.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of developers-list digest..."
Today's Topics:
1. Re: MonetDB: mosaic - Get rid of MCstartMaintenance and MCexitMainte... (Martin Kersten)
----------------------------------------------------------------------
Message: 1 Date: Wed, 18 Sep 2019 17:13:33 +0200 From: Martin Kersten
To: developers-list@monetdb.org Subject: Re: MonetDB: mosaic - Get rid of MCstartMaintenance and MCexitMainte... Message-ID: <90f5c40e-3c1c-5299-83cb-621660f3960c@cwi.nl> Content-Type: text/plain; charset=utf-8; format=flowed I suggest to keep these functions available in the code base.
They may be needed soon and are easier to control then using monetdb stop <db> Sure but not in the mosaic feature branch. They are not needed there as I am now using proper GDK style bat level locks. But I guess it wouldn't hurt if somebody cherry picks the corresponding change sets directly into the default branch. But I am too busy currently :)
On 17/09/2019 17:41, Aris Koning wrote:
Changeset: b9c74a8bec29 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b9c74a8bec29 Modified Files: clients/Tests/exports.stable.out monetdb5/mal/mal_client.c monetdb5/mal/mal_client.h Branch: mosaic Log Message:
Get rid of MCstartMaintenance and MCexitMaintenance.
diffs (99 lines):
diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out --- a/clients/Tests/exports.stable.out +++ b/clients/Tests/exports.stable.out @@ -1449,7 +1449,6 @@ str MBMuniform(bat *ret, oid *base, lng int MCactiveClients(void); str MCawakeClient(int id); void MCcloseClient(Client c); -str MCexitMaintenance(Client cntxt); Client MCforkClient(Client father); Client MCgetClient(int id); bool MCinit(void); @@ -1457,7 +1456,6 @@ Client MCinitClient(oid user, bstream *f int MCinitClientThread(Client c); int MCpushClientInput(Client c, bstream *new_input, int listing, char *prompt); int MCshutdowninprogress(void); -str MCstartMaintenance(Client cntxt, lng timeout, int abort); void MCstopClients(Client c); str MCsuspendClient(int id); int MCvalid(Client c); diff --git a/monetdb5/mal/mal_client.c b/monetdb5/mal/mal_client.c --- a/monetdb5/mal/mal_client.c +++ b/monetdb5/mal/mal_client.c @@ -518,64 +518,6 @@ MCawakeClient(int id) }
/* - * Server maintenance modes without stopping it completery calls for care. - * Any new client connection should be temporily be refused - * and all clients should stop at a MAL instruction. - * In rare cases, all running queries should be aborted. - */ -str -MCstartMaintenance(Client cntxt, lng timeout, int abort) -{ - int active=1; - Client c = mal_clients; - (void) abort; - - MT_lock_set(&mal_contextLock); - for(c= mal_clients +1; c < mal_clients+MAL_MAXCLIENTS; c++) - if( cntxt != c) - c-> itrace = 'S'; - // wait for all running users to stop - while (active && timeout > 0){ - active = 0; - for(c= mal_clients +1; c < mal_clients+MAL_MAXCLIENTS; c++) - if( cntxt!= c && c->mode == RUNCLIENT){ - if (abort ){ - c->mode = FINISHCLIENT; - active++; - } else - if( cntxt != c) - active += c->itrace == 'S'; - } else - if (cntxt!= c && c->mode == FINISHCLIENT) - active++; - if( active == 0) - break; - MT_sleep_ms(1000); - timeout--; - } - if( timeout == 0 && active){ - for(c= mal_clients +1; c < mal_clients+MAL_MAXCLIENTS; c++) - if( c->itrace == 'W' || c->itrace == 'S') - c->itrace = 0; - throw(MAL,"clients.startmaintenance","timeout"); - } - return MAL_SUCCEED; -} - -str -MCexitMaintenance(Client cntxt) -{ - Client c = mal_clients; - (void) cntxt; - - for(c= mal_clients +1; c < mal_clients+MAL_MAXCLIENTS; c++) - if( c->itrace == 'W' || c->itrace == 'S') - c->itrace = 0; - MT_lock_unset(&mal_contextLock); - return MAL_SUCCEED; -} - -/* * Input to be processed is collected in a Client specific buffer. It * is filled by reading information from a stream, a terminal, or by * scheduling strings constructed internally. The latter involves diff --git a/monetdb5/mal/mal_client.h b/monetdb5/mal/mal_client.h --- a/monetdb5/mal/mal_client.h +++ b/monetdb5/mal/mal_client.h @@ -201,8 +201,6 @@ mal_export str MCsuspendClient(int i mal_export str MCawakeClient(int id); mal_export int MCpushClientInput(Client c, bstream *new_input, int listing, char *prompt); mal_export int MCvalid(Client c); -mal_export str MCstartMaintenance(Client cntxt, lng timeout, int abort); -mal_export str MCexitMaintenance(Client cntxt);
mal_export str PROFinitClient(Client c); mal_export str PROFexitClient(Client c); _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
------------------------------
Subject: Digest Footer
_______________________________________________ developers-list mailing list developers-list@monetdb.org https://www.monetdb.org/mailman/listinfo/developers-list
------------------------------
End of developers-list Digest, Vol 78, Issue 8 **********************************************
participants (1)
-
aris