Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-15026

Remove storage of physical page ids in a DurableBackgroundCleanupIndexTreeTask

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.12
    • persistence, sql
    • None
    • Fixed possible failure of background cleanup of dropped SQL indexes.
    • Release Notes Required

    Description

      DurableBackgroundCleanupIndexTreeTask does one bad thing - it stores page id into a logical metastorage record. BUT, there are no guarantees that this page exists in current checkpoint state on the storage device.

      Imagine that someone waits for checkpoint, then before the next checkpoint they create SQL index, then drop it and end the process with "kill -9". There's a chance that something like this could happen by accident.

      Then page id in DurableBackgroundCleanupIndexTreeTask will either point to a nonexistent page (trace 1) or to the existing page that has nothing to do with meta tree (trace 2).

      java.lang.ArrayIndexOutOfBoundsException: 4937
      	at org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.getStore(FilePageStoreManager.java:1085)
      	at org.apache.ignite.internal.processors.cache.persistence.pagemem.PageReadWriteManagerImpl.read(PageReadWriteManagerImpl.java:65)
      	at org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.read(FilePageStoreManager.java:510)
      	at org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMemoryImpl.acquirePage(PageMemoryImpl.java:871)
      	at org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMemoryImpl.acquirePage(PageMemoryImpl.java:697)
      	at org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMemoryImpl.acquirePage(PageMemoryImpl.java:686)
      	at org.apache.ignite.internal.processors.cache.persistence.DataStructure.acquirePage(DataStructure.java:185)
      	at org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.acquirePage(BPlusTree.java:6061)
      	at org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.destroyDownPages(BPlusTree.java:2607)
      	at org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.destroy(BPlusTree.java:2555)
      	at org.apache.ignite.internal.processors.query.h2.DurableBackgroundCleanupIndexTreeTask.execute(DurableBackgroundCleanupIndexTreeTask.java:231)
      	at org.apache.ignite.internal.processors.localtask.DurableBackgroundTasksProcessor$1.body(DurableBackgroundTasksProcessor.java:121)
      	at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:119)
      	at java.lang.Thread.run(Thread.java:748)
      
      4d11-9351-08a40b89548c
      java.lang.IllegalStateException: Failed to get page IO instance (page content is corrupted)
      	at org.apache.ignite.internal.processors.cache.persistence.tree.io.IOVersions.forVersion(IOVersions.java:84)
      	at org.apache.ignite.internal.processors.cache.persistence.tree.io.IOVersions.forPage(IOVersions.java:96)
      	at org.apache.ignite.internal.processors.query.h2.database.H2Tree.getMetaInfo(H2Tree.java:508)
      	at org.apache.ignite.internal.processors.query.h2.database.H2Tree.<init>(H2Tree.java:240)
      	at org.apache.ignite.internal.processors.query.h2.DurableBackgroundCleanupIndexTreeTask$H2TreeToDestroy.<init>(DurableBackgroundCleanupIndexTreeTask.java:359)
      	at org.apache.ignite.internal.processors.query.h2.DurableBackgroundCleanupIndexTreeTask.execute(DurableBackgroundCleanupIndexTreeTask.java:208)
      	at org.apache.ignite.internal.processors.localtask.DurableBackgroundTasksProcessor$1.body(DurableBackgroundTasksProcessor.java:121)
      	at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:119)
      	at java.lang.Thread.run(Thread.java:748)
      

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            ktkalenko@gridgain.com Kirill Tkalenko
            ktkalenko@gridgain.com Kirill Tkalenko
            Ivan Bessonov Ivan Bessonov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h
                1h

                Slack

                  Issue deployment