In case of checksum error, insure correct error reported to user.
-----------------------------------------------------------------
Key: DERBY-5002
URL: https://issues.apache.org/jira/browse/DERBY-5002
Project: Derby
Issue Type: Bug
Components: Store
Affects Versions: 10.7.1.1
Reporter: Mike Matrigali
Checksum errors should always be reported first before doing any other checking
on the page. Before this fix
the system would read in the page header first and as a side effect of the read
do some initial sanity checking which
for some page corruptions would report errors and never get to the check sum
check. Checksum errors should
be reported first as they most quickly and clearly point to disk and system
crash problems.
For example in the database corruption reported in DERBY-4894 the following
error was reported when instead a
checksum error should have been reported:
ERROR XSDB0: Unexpected exception on in-memory page Page(103,Container(0, 1137))
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.impl.store.raw.data.StoredPage.initSlotTable(Unknown Source)
at org.apache.derby.impl.store.raw.data.StoredPage.initFromData(Unknown Source)
at org.apache.derby.impl.store.raw.data.CachedPage.setIdentity(Unknown Source)
at org.apache.derby.impl.services.cache.ConcurrentCache.find(Unknown Source)
at org.apache.derby.impl.store.raw.data.FileContainer.getAnyPage(Unknown Source)
at org.apache.derby.impl.store.raw.data.BaseContainer.getAnyPage(Unknown Source)
at org.apache.derby.impl.store.raw.data.BaseContainerHandle.getAnyPage(Unknown
Source)
at org.apache.derby.impl.store.raw.data.PageBasicOperation.findpage(Unknown
Source)
at org.apache.derby.impl.store.raw.data.PageBasicOperation.needsRedo(Unknown
Source)
at org.apache.derby.impl.store.raw.log.FileLogger.redo(Unknown Source)
at org.apache.derby.impl.store.raw.log.LogToFile.recover(Unknown Source)
at org.apache.derby.impl.store.raw.RawStore.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown
Source)
at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown
Source)
at org.apache.derby.impl.store.access.RAMAccessManager.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown
Source)
at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown
Source)
at org.apache.derby.impl.db.BasicDatabase.bootStore(Unknown Source)
at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown
Source)
at
org.apache.derby.impl.services.monitor.BaseMonitor.startProviderService(Unknown
Source)
at
org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartService(Unknown
Source)
at
org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService(Unknown
Source)
at
org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown Source)
at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:322)
at java.sql.DriverManager.getConnection(DriverManager.java:297)
at org.apache.derby.impl.tools.ij.ij.dynamicConnection(Unknown Source)
at org.apache.derby.impl.tools.ij.ij.ConnectStatement(Unknown Source)
at org.apache.derby.impl.tools.ij.ij.ijStatement(Unknown Source)
at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown Source)
at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
at org.apache.derby.impl.tools.ij.Main.main(Unknown Source)
at org.apache.derby.tools.ij.main(Unknown Source)
------------ END SHUTDOWN ERROR STACK -------------
2010-11-08 19:59:32.965 GMT:
Shutting down instance a816c00e-012c-2d12-7233-000000073238 with class loader
sun.misc.Launcher$AppClassLoader@4be14be1
----------------------------------------------------------------
2010-11-08 19:59:32.981 GMT Thread[main,5,main] Cleanup action starting
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira