Page MenuHomePhabricator

deletion process is broken
Closed, ResolvedPublic

Description

Author: elwp

Description:
I created an article 'G' with text 'g', deleted it, and now this is in the database:

select * from text where old_text='g';
+--------+----------+-----------+

old_idold_textold_flags

+--------+----------+-----------+

1031gutf-8

+--------+----------+-----------+

select * from revision where rev_text_id=1031;
Empty set (0.00 sec)

select * from page where page_title='G';
Empty set (0.02 sec)

select * from archive where ar_text='g' or ar_title='G';
Empty set (0.00 sec)

The text should be in table 'archive', not in 'text'. I can reproduce this
error, but
sometimes it works normally. I am not sure about the exact circumstances.


Version: 1.5.x
Severity: critical
OS: Linux
Platform: PC

Details

Reference
bz2018

Event Timeline

bzimport raised the priority of this task from to High.Nov 21 2014, 8:27 PM
bzimport set Reference to bz2018.
bzimport added a subscriber: Unknown Object (MLST).

Text is no longer removed on deletion; this is necessary to keep block-compression from exploding, and
working cleanly with other backend storage changes in progress or to be made.

I've checked in a fix to make this work properly. page and revision entries are removed, and archive
entries retain the original revision.rev_id and text.old_id; revision records are recreated on undelete,
while text records are retained, and simply not visible except through the sysop's undelete interface or
the raw database.