Issue 9669

Title
Deleting a big amount of records results in access to non-existing records
Priority
bug
Status
in-progress
Nosy list
ced, nicoe, reviewbot
Assigned to
nicoe
Keywords
review

Created on 2020-10-02.17:34:04 by nicoe, last changed yesterday by ced.

Messages

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2020-10-25.11:48:02

Did you try the proposal of msg60792?

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2020-10-11.17:22:11
> I tried to delete records by batch taking care of the group they're in until I found a way more easier fix for this.

I do not understand this statement. What is your review doing?


I'm not sure that the order of deletion will prevent such issue because if the scroll is set on the bottom. Removing the last record will trigger the display of the first non visible record above which may be already deleted.
Indeed I think we should not make RPC calls for record deleted (probably testing the destroyed attribute) and instead return empty values.
Author: [hidden] (nicoe) Tryton committer
Date: 2020-10-02.17:34:04
When deleting a lot of records (typically I create 2 thousands parties, select all of them (CTRL-A) and delete them). Tryton correctly deletes them but it outputs the message window about "Accessing non existant records".

The reason is that once the record are removed from the database, tryton starts removing each record one by one but once a non displayed record should be displayed GTK makes a call to get the related data of the record which obviously fail.

I tried to delete records by batch taking care of the group they're in until I found a way more easier fix for this.
History
Date User Action Args
2020-10-25 11:48:02cedsetmessages: + msg61396
status: chatting -> in-progress
2020-10-11 17:22:11cedsetnosy: + ced
messages: + msg60792
2020-10-02 17:55:23reviewbotsetstatus: unread -> chatting
nosy: + reviewbot
messages: + msg60512
2020-10-02 17:55:22reviewbotsetreviews: 294631002
keyword: + review
2020-10-02 17:34:04nicoecreate

Showing 10 items. Show all history (warning: this could be VERY long)