RE: [NeoStats-Devel] [Commits] r2699 - in trunk: include src
"M" <[email protected]> Sun, 14 Aug 2005 21:57:53 +0100
| Newsgroups | gmane.comp.neostats.devel |
|---|---|
| Message-ID | <[email protected]> |
Justin Hammond wrote:
> runlevel system, because I couldn't get the exculsion
> databases to close correctly using closetable. It was
> something I was going to look into further but havn't got to it yet.
The core should automatically close module exclusion databases when a module
unloads via the DBACloseDatabase call which closes all "tables" for the
affected module. Stepping through this process in the debugger shows this is
being called with the correct run level and is closing all module databases
including exclusions. A call to DBACloseTable should never be needed to
close an exclusions table for a module or the core. It is not clear which
one you are having issues with.
A test unload module results in: (exclusion highlighted with <----***)
14/08/2005[21:40:00] DEBUGTX NeoStats - :stats2.ctcp.net ] :secureserv
Module unloaded
14/08/2005[21:40:00] DEBUG1 SecureServ - DBACloseDatabase SecureServ
14/08/2005[21:40:00] DEBUG1 SecureServ - Closing Database SecureServ
14/08/2005[21:40:00] DEBUG1 SecureServ - Closing Table
data/SecureServhelpers
14/08/2005[21:40:00] DEBUG1 SecureServ - Closing Table data/SecureServconfig
14/08/2005[21:40:00] DEBUG1 SecureServ - Closing Table
data/SecureServexclusions <----***
14/08/2005[21:40:00] DEBUG1 SecureServ - Closing Table
data/SecureServmonchans
14/08/2005[21:40:00] DEBUG1 SecureServ - Closing Table
data/SecureServrandomnicks
For the core, FiniDBA will close all core tables and any remaining open
module tables since it loops through all loaded databases and tables.
A test shutdown results in: (exclusion highlighted with <----***)
14/08/2005[21:40:21] DEBUG1 SecureServ - DBACloseDatabase SecureServ
14/08/2005[21:40:21] DEBUG1 SecureServ - Closing Database SecureServ
14/08/2005[21:40:21] DEBUG1 SecureServ - Closing Table
data/SecureServhelpers
14/08/2005[21:40:21] DEBUG1 SecureServ - Closing Table data/SecureServconfig
14/08/2005[21:40:21] DEBUG1 SecureServ - Closing Table
data/SecureServexclusions <----***
14/08/2005[21:40:21] DEBUG1 SecureServ - Closing Table
data/SecureServmonchans
14/08/2005[21:40:21] DEBUG1 SecureServ - Closing Table
data/SecureServrandomnicks
14/08/2005[21:40:21] DEBUG1 NeoStats - DBACloseDatabase NeoStats
14/08/2005[21:40:21] DEBUG1 NeoStats - Closing Database NeoStats
14/08/2005[21:40:21] DEBUG1 NeoStats - Closing Table data/NeoStatsexclusions
<----***
14/08/2005[21:40:21] DEBUG1 NeoStats - Closing Table data/NeoStatsconfig
So it appears to be working as expected.
Rev 2734 includes the debug text used to generate the above output.
How are you determining that a file is not closing?
You appear to have added a call to DBACloseTable("exclusions"); in
FiniExcludes. Apart from the fact that this is not necessary, if this is
what is not working (and it should not), it is nothing to do with run level,
it is to do with the fact that a table name is path+root+name, i.e.
"data/moduleexclusions", "data/neostatsexclusions " etc.
I can look at altering the way that DBACloseTable works but this would also
need a few changes to the DBA use of it. For now I am more concerned with
your suggestion that the table is not closing.
Mark.