Skip to content

Corruption risk on drop table with non exclusive connection [CORE6073] #6323

Open
@firebird-automations

Description

@firebird-automations

Submitted by: Kjell Rilbe (kjellrilbe)

Votes: 2

I have once suffered database corruption due to dropping tables when other users were working with the same database. IBSurgeon helped med repair it, and explained that drop table should be considered an exclusive action, i.e. perform only under exclusive connection.

According to them, the problem still exists in latest released versions 2.5 and 3.0, not sure about 4.0.

This is from Alexey Kovyazin of IBSurgeon in May 2019:

"We know, that drop table during the active users work leads to corruption, but we don't have reproducible test case, only corrupted databases from the people who used to drop tables.

It looks like the reason of the corruption is the interrupted DROP TABLE command - it does not complete properly - data, pointer and index root pages are deleted, but records in RDB$PAGES/RDB$RELATIONS/RDB$RELATION_FIELDS/etc remain.
After that, the access to the partially deleted table is not possible - it gives error "wrong page type expected 4, found XX".

Right now, we don't have time to create the test case to reproduce it - theoretically, it could be some fork of firebird-oltp-test with create-drop-create cycle."

I wish I could create a test case, but just maybe the description of the error would hint at some part of the code?

Anyway, until fixed, I would suggest that the problem be documented in release notes and drop table command documentation, with a recommendation to drop table only in exclusive mode.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions