From: Vlad S. <vl...@cr...> - 2006-05-01 17:57:31
|
I agree, i was just surprised that DB driver never calls DbClose on exit, if i need to do it i have to write proc that will call ns_db bouncepool for every registered pool on server exit for Berkeley Db module i will do on_exit callback internally but just wanted to see other opinions on the topic in general Andrew Piskorski wrote: > On Mon, May 01, 2006 at 01:23:52PM -0400, Vlad Seryakov wrote: > >> Subject: Module unloading > > Well, don't think you're talking about module unloading at all > (good!). You seem to be talking about callbacks to call when shutting > down the Naviserver process. > >> Funny thing i encountered today, working with Berkeley module, i >> discovered that once loaded, DB driver is never closed, in case of DB it >> needs to be closed otherwise datafile can be corrupted. > > What do you mean the, "DB driver is never closed"? What is the actual > problem, specifically? > >> I am thinking to make it more generic, to add Ns_ModuleShutdown call to >> the modules and if defined, register it and on server shutdown call them >> in reverse order. Each module will decide what to do it if such public > > There is already a Tcl ns_atshutdown command. Is it not sufficient > for whatever special case handling you need to do for you use of > Berkeley DB on Naviserver process shutdown? > >> And for nsdb module i would close all pools on exit, for SQL drivers >> that is not the problem but for others it could be important. > > If it's not necessary, why do it? Could it hang or otherwise break or > delay orderly process shutdown? If not, then it seems like a > reasonable and maybe desirable thing to do. And if it is desirable, > why not just do it by default all the time, for all nsdb database > pools? > -- Vlad Seryakov 571 262-8608 office vl...@cr... http://www.crystalballinc.com/vlad/ |