[Zope-Checkins] SVN: Zope/branches/2.13/ Backport c122072 from trunk - close databases on shutdown to write out .index file
Hano Schlichting
cvs-admin at zope.org
Sun Oct 21 17:28:57 UTC 2012
Log message for revision 128100:
Backport c122072 from trunk - close databases on shutdown to write out .index file
Changed:
U Zope/branches/2.13/doc/CHANGES.rst
U Zope/branches/2.13/src/Zope2/App/startup.py
U Zope/branches/2.13/src/Zope2/Startup/__init__.py
-=-
Modified: Zope/branches/2.13/doc/CHANGES.rst
===================================================================
--- Zope/branches/2.13/doc/CHANGES.rst 2012-10-21 15:57:56 UTC (rev 128099)
+++ Zope/branches/2.13/doc/CHANGES.rst 2012-10-21 17:28:54 UTC (rev 128100)
@@ -8,12 +8,15 @@
2.13.19 (unreleased)
--------------------
-- LP #930812: Scrub headers a bit more.
-
- Updated distributions:
- tempstorage = 2.12.2
+- Explicitly close all databases on shutdown, which ensures `Data.fs.index`
+ gets written to the file system.
+
+- LP #930812: Scrub headers a bit more.
+
- Fix lock and pid file handling on Windows. On other platforms
starting Zope tolerated existing or locked files, this now also
works on Windows.
Modified: Zope/branches/2.13/src/Zope2/App/startup.py
===================================================================
--- Zope/branches/2.13/src/Zope2/App/startup.py 2012-10-21 15:57:56 UTC (rev 128099)
+++ Zope/branches/2.13/src/Zope2/App/startup.py 2012-10-21 17:28:54 UTC (rev 128100)
@@ -76,7 +76,7 @@
m=imp.find_module('custom_zodb',[configuration.testinghome])
except:
m=imp.find_module('custom_zodb',[configuration.instancehome])
- except:
+ except Exception:
# if there is no custom_zodb, use the config file specified databases
DB = dbtab.getDatabase('/', is_root=1)
else:
Modified: Zope/branches/2.13/src/Zope2/Startup/__init__.py
===================================================================
--- Zope/branches/2.13/src/Zope2/Startup/__init__.py 2012-10-21 15:57:56 UTC (rev 128099)
+++ Zope/branches/2.13/src/Zope2/Startup/__init__.py 2012-10-21 17:28:54 UTC (rev 128100)
@@ -108,6 +108,9 @@
self.shutdown()
def shutdown(self):
+ databases = getattr(self.cfg.dbtab, 'databases', {})
+ for db in databases.values():
+ db.close()
self.unlinkLockFile()
self.unlinkPidFile()
More information about the Zope-Checkins
mailing list