Ivan Bessonov created IGNITE-14447: -------------------------------------- Summary: Invalid meta page can be used after index re-creation Key: IGNITE-14447 URL: https://issues.apache.org/jira/browse/IGNITE-14447 Project: Ignite Issue Type: Bug Reporter: Ivan Bessonov Assignee: Ivan Bessonov Fix For: 2.11
Consider the following scenario: * A user creates index "A" * Ignite allocates page 0x1234 as the index meta page and writes it to the index roots tree * Index is populated, query entity is written on disk * Checkpoint is triggered and the index pages (including root) are written to disk * User drops the index * The tree is deallocated, the meta page is removed from the roots tree, query entity without the index is written to disk. No logical record is written for the roots tree. * Node crashes without checkpoint being marked * Node restarts. Since the query entity does not contain the index "A", the index tree is not created * User deletes some entries, then attempts to create the index "A" again * Since the node did not trigger checkpoint before the crash and no logical record was written, the root tree contains obsolete tree with links pointing to non-existing data (namely, index "A" still refers to page 0x1234) * Depending on allocation pattern and enabled assertions flag, the node will either fail with an assertion, or will crash the JVM Fundamentally, the issue is caused by inconsistency between index roots tree and query entity. Ideally, we should move cache configuration to page memory subsystem, but this may be a big change. We should check whether writing a logical record on index drop that will run the index cleanup on recovery mitigates the issue (in other words, the index cleanup persistent task should be triggered even if no checkpoint was marked after query entity is persisted). -- This message was sent by Atlassian Jira (v8.3.4#803005)