Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug #30770380 INNODB: IBUF CURSOR RESTORATION FAILS!
Problem: The server terminates abnormally when it fails to restore cursor over insert buffer (Ibuf) index while deleting a insert buffer record. Analysis: when background io thread read an secondary index page form disk to the buffer pool, we merge Ibuf entries into that index page and remove those Ibuf entries. If at the same time, truncate operation is being executed, truncate remove all ibuf entries for the tablespace. If both io thread and truncate thread delete ibuf entries for same page and if delete an entry requires node merge (pessimistic delete) then first we mark that entry as delete-marked so other thread will not apply it on index page and later we restore the cursor on that record and do a pessimistic delete. In this situation, if io thread removes Ibuf entry then truncate thread will not be able to restore the cursor on ibuf entry. Or if truncate thread removes Ibuf entry then io thread will not be able to restore the cursor on Ibuf entry. Fix: Added a check If Ibuf cursor restoration fails when truncate operation is being executed for that tablespace then we assume that other thread must have removed that ibuf entry therefore do not delete ibuf entry. RB: 24334 Reviewed by : Annamalai Gurusami <[email protected]>
- Loading branch information