Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-5002

In case of checksum error, insure correct error reported to user.

    XMLWordPrintableJSON

Details

    Description

      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

      Attachments

        1. derby_5002.diff
          4 kB
          Mike Matrigali

        Issue Links

          Activity

            People

              mikem Mike Matrigali
              mikem Mike Matrigali
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: